They entered the building as President Nayib Bukele was about to address lawmakers. Earlier, he gave them seven days to back his loan plan.
Opposition politicians called the appearance of armed men in parliament an unprecedented act of intimidation.
El Salvador has one of the highest murder rates in the world.
Most of the violence is carried out by criminal gangs that operate across Central America.
President Bukele took office in June 2019, pledging to tackle the legacy of gang violence and corruption in the impoverished Central American nation.
The 38-year-old leader wants to use the loan to improve the equipment of police and the armed forces in the fight against crime.
In particular, the funds would be used to buy police vehicles, uniforms, surveillance equipment and a helicopter.
But over the weekend, most MPs opted not to sit for a debate over the proposed bill.
With no quorum in parliament, the president called on his supporters to descend on the parliament building, the BBC's Central America correspondent Will Grant reports.
About 50,000 pro-government demonstrators turned out.
President Bukele told them to be back in the streets within a week if MPs did not debate the bill.
His political opponents accused him of threatening them and turning increasingly authoritarian.