Ramesses III. was a Pharaoh of the 20th dynasty and he came to the throne around the year 1,185 BC after his father Setnakhte. Egypt was weakened and endangered by neighbouring nations. Ramesses III proved to be a wise ruler and he unified the land for the last time and returned it its shine.
There was chaos in Egypt at the end of 19th dynasty rule, so a Syrian usurper Irsu ("The one who has made himself") used it and got the power over Egypt. The Amun's priesthood as well as the inhabitants began to rebel against the tyrant and they supported an Egyptian soldier Setnakhte, who brought Irsu down. Then Setnakhte came to the throne and founded the 20th dynasty, but he didn't rule for a long period. He died after 2 years of reign and was replaced by his son Ramesses III.
Ramesses III forced the Sea nations out of Egypt
Ramesses III. was extraordinary intellingent and had outstanding military abilities. He tried to ensure the Nile delta at first. His second aim was to forced Libyan hordes out of western Egypt and he was successful after 2 wars. The first was took place in the fifth year of his reign and the second in the eleventh year of his reign. The second campaign was more difficult, because an organized Libyan army fought against the Pharaoh, which was led by an experienced commander Kapera. The battle took place near Memphis (Mennefer) - Ramesses III. was more successful and he even took Kapera captive.
Ramesses III. had to solve another precarious situation between these two wars. The Sea nations were preparing for invasion into the Nile delta. These nations destroyed the Hittite Empire and Mycenae as well, then they were in Syria for some time and then Egypt was their next aim. Ramesses III. didn't ignore this danger and sent messengers to all garrisons on the eastern border to defend at any price and wait for the support of Ramesses III. army.
Ramesses III. had very detailed information about the enemy movement - enemies overland movement was supported by attacks led from the sea against the coast. So there was a need to prepare the Nile mouth for the defence. Ramesses let fortify the longshore cities and established a post of archers at the shore. He also placed experienced units and chariots at the rear.
Victorious overland battle
Ramesses III. left Pi-Ramesses and campaigned into Palestina towards the enemy. Ramesses was supported by local rulers, who were famous for their dangerous charriots. The conflicts with sea nations were very rough. But Ramesses was all around the battle - he sharply attacked the opponent, encouraged his soldiers and heartened them. Chaos was brought into the rows of the Sea nations; the civilians started running away and left their carriages there. These who survived the battle were captures and enslaved.
So the overland danger was staved off, but the Mediterranean Sea was still a certain threat. The Sea nations fleet was moving to the Nile delta at that time, but Ramesses was prepared.
The Egyptians excellently handled their ships on the river, but they weren't so strong on the sea. The naval battle finally took place near the coast close to Pelusium and that was very promising for the Egyptians. The archers shot from the Egyptian ships at the coast, the soldiers threw hooks on enemy ships to pull them and then take them by assault.
Another Egyptian squadron arrived from open sea in the middle of the battle. The enemy was surprised by heavy ships handled by rowers, because the Sea nations didn't have any. The Egyptian soldiers rained blows from big catapults on the enemy, so he was defeated overland as well as on the sea. Several enemy ships were sunk, others had broken masts, so they got stuck in the shallows.
A significant builder
Ramesses III. also wanted to go down in history as a builder and his new focal point became the mortuary temple in Medinet Habu (Djamet) at the expense of Karnak and the temple resembles closely the Ramesseum. Ramesses III also built in Karnak and Luxor.
A fatal conspiracy
The end of Ramesses III. reign was accompanied with conspiracies. The Lower Egypt vizier tried to take power over the city Tell Atrib and he was forced out of the city by Ramesses III. Ramesses also had to face the artisans' strikes, whose work wasn't paid by the temples. A large conspiracy was plotted against Ramesses III. right at the Pharaoh's court. You can get more information about this conspiracy there.
Ramesses III. died around year 1,153 BC but his death wasn't a consequence of the conspiracy. His son Ramesses IV kept an eye on bringing the court to a successful conclusion. But when he realized how many high officials were involved in it, he declared a general amnesty at the day of his enthronement in Amun's temple.