The United Nation's top diplomat in Afghanistan says the unstable security environment has not stopped work to prepare for September's legislative elections and next month's Kabul conference.

U.N. envoy Staffan de Mistura took up his post in March, after the departure of his sometimes controversial predecessor, Kai Eide.

In his first report to the U.N. Security Council Wednesday, de Mistura said the United Nations is focusing on four areas: providing technical assistance for the September 18th parliamentary elections; contributing to strategies for building the capacity of the national police and army; supporting Afghan-led reconciliation talks; and assisting the government in coordinating the large amount of international aid it receives.

President Hamid Karzai was returned to office last year in a vote marred by widespread fraud. De Mistura said he hopes the September poll will benefit from the lessons learned in that election. But he cautioned that security for the upcoming elections remain one of the biggest challenges to its success.

"The main challenge - security. The second main challenge - security," said De Mistura. "Because if the elections are tarnished by excessive security problems, that may include the closing of polling stations, therefore disenfranchising of people who could have been voting."

He said there are more than 2,500 candidates, including 400 women running for the 249 seats. De Mistura said they expect some 12.5 million people will be registered to vote.

Before the election, there will be an international conference in Kabul on July 20th. It will be co-hosted by President Karzai and U.N. Secretary-General Ban Ki-moon. The meeting will be attended at the foreign minister level.

The U.N. Security Council just returned from a three-day trip to Afghanistan intended to give them a first-hand look at the situation. They met with the country's leadership, civil society, NATO and U.N. representatives and had wide-ranging discussions.