Original: Tehran finally became the capital of Iran in 1795, when the Qajar king Agha Mohammad Khan was crowned in the city.
Simplified: Finally, Tehran became the capital of Iran, in 1795, when Agha Mohammad Khan, became Iran King.