The siege of Memphis (early 525 BC) was the last recorded resistance to Cambyses II of Persia's invasion of Egypt, and came after the main Egyptian army had been defeated at Pelusium.
Early in 525 Cambyses led his army across the Sinai and defeated the armies of Pharaoh Psamtik III at Pelusium. In the aftermath of the battle the Pharaoh retreated to Memphis, and prepared to defend the city.
Cambyses sent a Persian herald on a Mytilenean ship up the Nile to Memphis to suggest a truce. The defenders of Memphis reacted by attacking the ship, killing the crew and bringing the smashed remains of the ship into the city.
Cambyses reacted by laying siege to Memphis. Herodotus doesn’t say how long the siege lasted, but implies that it was long enough for the Libyans and the Greeks of Cyrene to sent tribute to him.
Eventually the city fell and Psamtik III was captured. Herodotus records a story about Cambyses's attempts to humiliate the former Pharaoh by forcing his daughter to carry out menial tasks and killing his son. As is typical in this sort of story Psamtik impressed Cambyses with his responses, and was taken into honourable captivity instead of being executed. He committed suicide a few years later, after being caught in a plot against the Persians.
Cambyses established a new 27th Dynasty, and appears to have been accepted in Egypt. Herodotus claimed that he was an unpopular ruler, but contemporary Egyptian records suggest otherwise. He remained in Egypt for most of the rest of his reign, only setting off for home when a revolt broke out in the heart of the Persian Empire.