Bangkok (CNN) -- The head of the Thai army issued a stern warning Thursday to protesters to avoid violence or the military will take action.
Political violence returned to the Thai capital as three anti-government protesters were killed by gunmen, hours before demonstrators hounded the interim Prime Minister from a meeting.
"If the situation turns more violent it could lead to riots," Army chief Gen. Prayuth Chan-ocha said in a national address. "The Army will have to use military forces to resolve the situation for peace and order."
The attack occurred at about 2 a.m. local time Thursday when gunmen on a pickup truck opened fire on a protest camp near the site of Bangkok's Democracy Monument, where protesters have been camped for months, said Lt. Gen. Paradon Patthanathabut, Thailand's national security adviser to the Prime Minister.
Bangkok's Erawan Emergency Center reported that three people were killed in the attack and 23 injured. The fatally injured victims included a 21-year-old man, who was shot in the chest, and a 51-year-old man.
Later that morning, anti-government protesters stormed the grounds of an Air Force office compound, forcing the country's caretaker Prime Minister to flee a meeting with members of the Election Commission.
Paradon said the protesters drove a truck through a gate to reach the front of an Air Force office complex, while new interim premier Niwatthamrong Boonsongpaisan and ministers were meeting in another part of the building. As a result of the disruption, the meeting was called off and the politicians left the venue, said Paradon.
Air Force spokesman Air Vice Marshal Montol Sanchukorn told CNN that the protesters, who are seeking the government's ouster, then demanded to "inspect" the room to check that the Prime Minister was no longer inside.
"We allowed them in to see, and they said they would have a bit of a rest before they left," he said. Some protesters remained to stage a sit-in at the complex.
Thailand was rocked by rival mass political protests over the weekend, with pro- and anti-government supporters taking to the streets in their tens of thousands following fresh twists in the country's protracted political crisis.
Caretaker Prime Minister Yingluck Shinawatra was removed from office along with nine cabinet ministers by a top court last Wednesday, and subsequently indicted by the country's anti-graft body. If the country's Senate votes to impeach her, she could be banned from politics for five years.
Protesters led by the People's Democratic Reform Committee have been agitating against her government since November, calling for it to be replaced with an unelected interim government.
Drawn mainly from Bangkok's royalist, middle class establishment, the anti-government protesters have been seeking to rid Thai politics of the alleged influence of Yingluck's brother, the former prime minister Thaksin Shinawatra.
Thaksin, a telecommunications tycoon, was overthrown in a 2006 military coup and has since lived in self-imposed exile to avoid a corruption conviction. His opponents claim he has continued to exert influence in Thai politics through his sister and other allies.
The November protests that sparked the current crisis were triggered by the government's botched attempt to pass an amnesty bill that would have cleared the way for his return to the political fold.
The anti-government protesters are seeking a new government -- but not through elections, which the opposition Democrat Party has boycotted, arguing the alleged corruption of their political rivals makes widespread reform necessary before any meaningful vote can be held.
Meanwhile the government's "red shirt" support base, many of whom hail from the country's rural north and northeast, view Shinawatra's ouster as a "judicial coup" and have been protesting what they consider an unfair bias by many of the country's institutions against their side.
Yingluck, who was elected in a landslide at the polls in 2011, is the third Thaksin-linked prime minister to be dismissed by the Constitutional Court, which also dissolved Thaksin's Thai Rak Thai political party in 2007.
Analyst Paul Quaglia, director at PQA Associates, a Bangkok-based risk assessment firm, told CNN last week that Yingluck's supporters saw her dismissal as a case of politically motivated judicial overreach.
"They consider it a way to usurp democratic elections," he said, adding that the opposition was unlikely to win at the polls.
"The Democrat Party say 'No, we can't have elections,' because they know they will lose those elections," he said.