Contrarily, having so firmly entrenched themselves into Greek affairs, the Romans now completely ignored the rapidly disintegrating Seleucid empire (perhaps because it posed no threat); and left the Ptolemaic kingdom to decline quietly, while acting as a protector of sorts, in as much as to stop other powers taking Egypt over (including the famous line-in-the-sand incident when the Seleucid Antiochus IV Epiphanes tried to invade Egypt). Eventually, instability in the near east resulting from the power vacuum left by the collapse of the Seleucid empire caused the Roman proconsul Pompey the Great to abolish the Seleucid rump state, absorbing much of Syria into the Roman republic. Famously, the end of Ptolemaic Egypt came as the final act in the republican civil war between the Roman triumvirs Mark Anthony and Augustus Caesar. After the defeat of Anthony and his lover, the last Ptolemaic monarch, Cleopatra VII at the Battle of Actium, Augustus invaded Egypt and took it as his own personal fiefdom. He thereby completed both the destruction of the Hellenistic kingdoms and the Roman republic, and ended (in hindsight) the Hellenistic era.
Who tried to invade Egypt in the famous line-in-the-sand incident?
Antiochus IV Epiphanes