The State Department announced Tuesday that it will give $20 million to Tunisia to help build its new democracy, boosting to more than $170 million the total in assistance for Arab countries that recently overthrew authoritarian leaders.

The money will provide training and expertise on how to operate a free press, create political parties, set up fair and open elections and the like, officials said. Some of it will also go toward helping Tunisia’s battered economy.

The funds are from unspent money appropriated by Congress for other purposes, officials said. The money for Tunisia will be distributed through the Middle East Partnership Initiative, a program begun by the George W. Bush administration that works with local nongovernmental groups to encourage democracy in the region.

“It’s a focused commitment of attention and resources, in order to . . . respond to the needs and aspirations voiced by the Tunisian people,” said Tamara Wittes, deputy assistant secretary of state for Near Eastern affairs, who oversees the program.

The $20 million represents nearly one-third of the 2010 budget of the Middle East Partnership Initiative, which covers 17 countries. The aid is considerably more than U.S. bilateral assistance to Tunisia last year, which was $2 million.

The State Department also announced that Microsoft will provide computer software and training to nongovernmental groups in Tunisia as part of a public-private initiative that could spread to other Middle Eastern countries.

Tunisians ousted their president in January after weeks of demonstrations, a move that helped inspire the ongoing uprisings in the Middle East. The Tunisian protests took off after Facebook and other social media spread word of the suicide of a fruit vendor who had complained of being harassed by authorities.

The European Union pledged $23 million in immediate aid for Tunisia’s fledgling democracy and $350 million over the next two years.

Secretary of State Hillary Rodham Clinton announced last month that the U.S. government would reprogram $150 million for Egypt to help with its economic recovery and democratic transition after the ouster of President Hosni Mubarak.