Nine of the 10 candidates for Congress in Maryland's 8th District ventured into the liberal stronghold of Takoma Park last night to discuss world peace and agreed on practically everything from arms control strategies to ways of curbing terrorism.

The candidates, six of seven Democrats and three Republicans running in the Sept. 9 primaries, showed relatively modest philosophical differences in a 2 1/2-hour discussion that revolved around nuclear proliferation, the lessons of the Vietnam War and U.S. policy toward South Africa and nations in the Middle East.

Only in a long debate over American policy in Central America, especially the countries of El Salvador and Nicaragua, did the candidates show stark ideological differences. The Democrats generally were harshly critical of U.S. intervention in the region while the Republicans tended to be more supportive of Reagan administration efforts.

The candidates' forum, the first in the campaign to focus exclusively on international peace issues, was sponsored by the Takoma Park Peace Task Force and drew 100 spectators to City Hall.

The winners of the two primaries will face each other in November.

Democrat Stewart Bainum Jr. did not attend the forum, but his primary rivals -- Leon G. Billings, John E. Boehm, Esther P. Gelman, Wendell M. Holloway, Robert J. Roosevelt and Carlton R. Sickles -- did. Republicans Phillip N. Buford, Constance A. Morella and William S. Shepard also took part in the event.

Billings, who is a lobbyist on Capitol Hill, had many supporters in the audience and got a warm response from others with his attacks on U.S. policies in Central America.

He drew the loudest applause of the night with an emotional appeal for increased economic aid to the region. "I would like to see $180 million a year in economic aid go into El Salvador," Billings said.

"We don't have a policy in El Salvador built towards people," he added. "We have it built towards propping up a military regime. We need to get on with solving the economic problems in Central America by means other than military intervention."

The other Democrats sounded a similar theme, but Republican Shepard hailed U.S. support for the "freedom fighters" in Nicaragua, while Morella labeled that country's Sandinista government a "threat to the democracies of Central America."

Morella and several of the Democratic candidates said the United States should concentrate its efforts on encouraging economic and political reform in Central America.

Gelman, a County Council member, sounded many themes shared by her fellow Democrats and Republican rivals. She called for a comprehensive treaty banning nuclear tests, cuts in a "fat and inefficent" U.S. military budget and continued support for Israel.

Republican Buford sided with the Democrats in questioning President Reagan's decision to bomb Libya earlier this year. "It looks like we've picked on a country that couldn't do anything about it when we went in there," Buford said.

Boehm, a follower of political extremist Lyndon LaRouche, hailed the raid on Libya, saying, "When my president is right, by God, I support him."

Boehm also broke ranks with his fellow Democrats in endorsing the president's Strategic Defense Initiative, also called Star Wars.

Sickles, who served in Congress in the 1960s, said he felt "not very proud" in voting for the Gulf of Tonkin resolution, which helped propel the United States toward war in Vietnam. Sickles said one lesson from that conflict was that politicians "should move slowly, carefully."

"Things can happen in the emotion of the time," Sickles said.