Updated

President-elect Mahmoud Ahmadinejad (search) completed a first step toward taking office on Wednesday — receiving religious approval from Iran's (search) supreme leader.

Ahmadinejad, the former mayor of Tehran (search) who won the June elections amid allegations of unfair practices, pledged to work for social justice and the alleviation of poverty after his inauguration before parliament on Saturday.

"The deprived people and the poor people will be the first priority on my agenda," Ahmadinejad told a crowd of hundreds of clerics, legislators and government officials. Among the audience was outgoing President Mohammad Khatami and the man Ahmadinejad defeated in the second-round run-off, former President Hashemi Rafsanjani.

During the ceremony, Khatami read out a letter in which Iran's supreme leader Ayatollah Ali Khamenei (search) appointed Ahmadinejad as president, and then handed the green folder containing the document to Khamenei, who passed it to the president-elect.

In his speech, Ahmadinejad railed against nuclear weapons, alluding to a dispute that pits Iran against Europe and the United States, which have demanded that Iran put a permanent halt to uranium enrichment and related activities. Uranium enriched to a high level is used for nuclear weapons; low-level enrichment is used for nuclear power reactors.

Iran has refused to abolish its enrichment facilities but insists its nuclear program is only for the generation of electrical power.

"Global threats, including weapons of mass destruction, chemical and biological weapons that are in the hands of dominant powers should be dismantled," Ahmadinejad said.

Supreme leader Khamenei struck a more defiant tone, suggesting Iran would continue with its nuclear program despite intense pressure from the West.

"All powers, and especially the Great Satan America, should know that the Iranian people would not pay tribute to any power," Khamenei said, employing the hard-line term for the United States.

Ahmadinejad, a non-cleric who was supported by many hard-line clerics in the elections, takes office at a time of sporadic instability in Iran. On Tuesday, a gunman on a motorcycle shot dead a senior judge as he drove away from his Tehran office. The judge had tried the case of a pro-reform journalist and specialized in cases of social vice.

During the election campaign there were mysterious bombings in Tehran and the southwestern province of Khuzestan, where Arabic-speaking citizens rioted against the government in April.