By Agence France-Presse
Baggio Leung and Yau Wai-ching belong to Hong Kong's embattled independence movement, which is calling for the semi-autonomous city to split from China as its freedoms come under threat from Beijing.
The pair were told they had "directly hurt the dignity of the legislative council" by judge Wong Sze-lai, who went on to grant them bail pending appeal.
They were both held in custody after the sentencing while the court awaited their bail money. Yau later waived her right to appeal and chose to serve out her sentence.
Calls for Hong Kong to split from China have incensed Beijing and the past two years have seen a crackdown on any expression of pro-independence views.
Yau, 27, and Leung, 31, are the latest activists to be given jail terms on protest-related charges.
They had pleaded not guilty to unlawful assembly and attempted forcible entry after trying to barge into a legislative council meeting in November 2016.
The duo had been barred from the main chamber pending a court decision over their disqualification from parliament
They ran into the chamber, and after security bundled them out, they and their supporters tried to push their way into a committee room to which the disrupted session had been moved.
In the ensuing chaos, they clashed again with security, with at least three staff taken to hospital and police called in.
Despite being elected by the public, the pair were never allowed to take up their seats after protesting at their swearing-in ceremony.
They deliberately misread their oaths of office, inserted expletives and draped themselves in "Hong Kong is not China" flags.
Beijing intervened to ensure they were not given the chance to retake their oaths by issuing a special "interpretation" of Hong Kong's mini-constitution.
The ruling said that any oath-taker who did not follow the prescribed wording of the pledge, "or takes the oath in a manner which is not sincere or not solemn", should be disqualified.
After the interpretation, Hong Kong's High Court ruled to bar them both.
Hong Kong is set to mark the 29th anniversary of China's crackdown on democracy protesters in Beijing's Tiananmen Square with a vigil in Victoria Park on Monday evening. It is the only place on Chinese soil where the anniversary is openly marked en masse.