British Prime Minister Boris Johnson's government was defeated in parliament on Monday for the first time since a December election, with the upper chamber voting in favour of a move to protect the rights of European Union citizens in Britain after Brexit.

Johnson's Conservative Party won a large majority in the lower chamber, the House of Commons, at the December 12 vote and lawmakers there quickly approved the legislation needed to ratify his exit deal with Brussels earlier this month.

More:

The legislation is now passing through the House of Lords, where the government does not have a majority.

While the upper chamber is not expected to block passage of the bill, it is seeking to make changes.

Members of the House of Lords voted 270 to 229 in favour of a change put forward by the pro-EU Liberal Democrats, which would give eligible EU citizens in the United Kingdom an automatic right to stay after Brexit, rather than having to apply to the government to do so.

It would also ensure they are given physical proof of their right to remain. The government has said only that people will be given a "secure digital status" that links to their passports.

Last week, European Parliament Brexit coordinator Guy Verhofstadt said Britain had told him it was looking into the possibility of providing a physical document to EU citizens, but Johnson's spokesman said he was not aware of any plans.

The government later suffered two further defeats in the House of Lords, over the power of British courts to depart from judgments of the European Court of Justice after Brexit.

It is facing another defeat on Tuesday, when members are due to vote on an amendment that would ensure protections for child refugees, a promise made by Johnson's predecessor, Theresa May, but absent from his legislation.

Any changes to the legislation made by the House of Lords have to go back to the House of Commons to be approved and could still be overturned.