In 1745 Nader shah planned to take control of the Persian Gulf. In order to do this he needed to take control of parts of the Arabian peninsula that bordered the Persian Gulf. So Nader created a large fleet before sending them to Muscat. Muscat was conquered and Nader allowed mainland Persians to immigrate to Muscat. When Nader Shah was assassinated in 1747 his empire disintegrated, and so the Sultanate of Oman regained independence from the Afsharid dynasty.