Prime Minister Theresa May's most senior political enforcer is facing calls to quit after he was accused of cheating to win a crucial Brexit vote in Parliament.

Government Chief Whip Julian Smith told some Tory lawmakers to break an arrangement with rival parties known as pairs, under which members of Parliament are designated to not vote when an opposite number is out sick or otherwise unavoidably absent, according to a Conservative official.

Nearly all of them ignored the instruction, but Conservative Party Chairman Brandon Lewis followed it and voted with the government in two knife-edge votes on Tuesday evening, one of which the government lost.

The other motion blocked an amendment put forward by Conservative rebels that could have kept the U.K. within the EU customs union after leaving the bloc. It was passed by 307 votes to 301.

What Smith didn't realize, according to the party official, was that the lawmaker whom Lewis had been paired with was Liberal Democrat deputy leader Jo Swinson, who was away because she had just given birth to her second son, Gabriel, on June 29. The Tories had promised, following complaints about heavily pregnant women being forced to vote, that new mothers would be given pairs.

Smith's behavior outraged lawmakers on all sides. Both Lewis and Smith have apologized for what they called a "mistake." May said on Wednesday that it had been "done in error" and was unacceptable.

The Conservative official denied there was a contradiction between May's comment and Smith having instructed Tories to break their pairs. The prime minister still has faith in Smith, her spokesman told reporters Thursday.