Parliamentary deputies voted overwhelmingly in favour of all ministers despite fierce criticism from conservatives who had threatened to reject some controversial nominees.
It had been expected that Mr Khatami could lose two candidates - Ayatollah Mohajerani as culture minister and Abdollah Nouri as interior minister - after they came under fire in more than 15 hours of debate on Tuesday and yesterday.
The vote confirmed Kamal Kharrazi, Iran's ambassador at the United Nations, as the new foreign minister, navy commander Rear-Admiral Ali Shamkhani as defence minister, and Qorbanali Dorri Najafabadi, a Shia Muslim cleric, at intelligence (internal security).
It also confirmed Bijan Namdar Zanganeh, who was a minister in charge of electricity and water, as oil minister of the world's third largest oil exporter and Hossein Namazi as the economy and finance minister, a post he first held from 1982 to 1986.
Mr Mohajerani, who had been sharply criticised by conservative deputies, received 144 votes in his favour, 96 against and 20 abstentions.
Parliament's vote of confidence on Mr Khatami's entire cabinet was seen by analysts as a major victory for the 54-year-old moderate Shia Muslim cleric who was sworn into office on 4 August after securing a landslide election victory in May.
The margin of votes indicated that he had won over a large section of the conservative-led parliament which he has to work with until the next parliamentary elections in 2000. The vote of confidence for Mr Mohajerani was seen as vital for Mr Khatami to carry out promises of bringing social and economic change to the 18-year-old Islamic republic.
Conservatives had directed their sharpest criticism at Mr Mohajerani as a "liberal" threatening the future of the Islamic republic and Mr Nouri for alleged disloyalty towards Iran's supreme leader, Ayatollah Ali Khamenei.
Mr Mohajerani defended his right to be appointed to the cabinet saying he was tolerant in the same way that Islam was tolerant to different view points. "I disagree with almost all of the present practices in the culture ministry. We have to protect artists and provide an atmosphere for creativity, tranquillity and freedom." he told deputies.
"Everybody who has accepted the Islamic Republic and its constitution must be subject to tolerance ... I condemn the burning of book shops, the beating of university lecturers and attacks on magazine offices."