There were no spectators in the stadium, however, because of a two-year old regulation prohibiting audiences at soccer stadiums following incidents of sectarian violence during games.
"We are one team" was the slogan for the 30-minute match played by ministers and legislators and attended by the Lebanese president.
On April 13, 1975, an ambush by Christian gunmen of a busload of Palestinians sparked a civil war that lasted 15 years, killed 150,000 people and caused $25 billion in damage.
Almost two decades after war ended, the country enjoys a precarious peace but this small Mediterranean nation, home to 18 religious sects, is still sharply split along sectarian and political lines with occasional outbreaks of sectarian violence.
A fragile national unity government headed by pro-Western Prime Minister Saad Hariri was formed in November which includes politicians from the Syria and Iran-backed Hezbollah.
Marking the war's anniversary Tuesday, lawmakers from the Shiite Muslim Hezbollah group and their allies played alongside politicians in the Western-backed parliamentary majority.
"The message is that sports can unite the Lebanese, and this is a very important since politics unfortunately is not uniting them," lawmaker Sami Gemayel of the right-wing Christian Phalange Party told The Associated Press.
The friendly match was advertised in the media through a TV clip showing politicians - each wearing a T-shirt the colour of the political party they represent - lined up on a soccer field singing the national anthem in unison.
However at Tuesday's game, the politicians were split into two teams, one wearing red and the other wearing white, the colours of the Lebanese flag, with the words "We are all one team" printed on the back.
The politicians high-fived, hugged and kissed following the game as they posed for pictures.
"I wish they would love each other as much in real life, instead of fighting all the time," said Rania Achkar, a 38-year-old woman who was watching it at home on TV. "It's a nice idea but they're just kidding themselves and us."
The game was broadcast live on local TV stations and was covered by local and international media. But the stadium was closed off to spectators, in line with regulations of the Lebanese Football Association to prevent violence.
For the last two years, soccer matches have been held without spectators because of violence in stadiums between Sunnis and Shiites supporting rival teams where sometimes injuries occurred.
"Today we are also sending a message of sportsmanship to sports fans in Lebanon. Everyone should accept the rules of the game," said Health Minister Mohammed Jawad Khalife who was taking part in the game.
The game was played at the Sports City in Beirut. The stadium served as a base for PLO fighters in the early 1970s and 1980s, until it was bombed out by Israel in 1982.
"Those dark days are never coming back," Hariri said.
The 40-year-old premier played throughout the game, jogging back and forth on the soccer field, but didn't score. Gemayel, 30, who was on Hariri's team, scored the game's only two goals.
"I feel great," a sweaty Hariri, wearing a red T-shirt and shorts, said grinning after the game.
Ali Ammar, one of two Hezbollah lawmakers taking part, said he had been fine-tuning his muscles and doing sprints for the past weeks in preparation.
"I hope that this good sportsmanship will reflect itself on politics as well," he said.
Gemayel, a vehement Hezbollah critic who often clashes verbally with members of the group, said he had "a positive feeling" playing with Hezbollah politicians.
"Sports is one thing and politics is another. At the world cup, countries that are at war play against each other. Why can't we?" he said.