A key section of Theresa May’s final plea for MPs to support her Brexit deal was changed at the last minute after it emerged a historical comparison she planned to make – that all parties backed the creation of the Welsh assembly after a narrow referendum result – was not true.

In the original version of the speech given on Monday at a factory in Stoke-on-Trent before the Brexit vote in the House of Commons the following day, the prime minister was due to say the result of the narrowly won 1997 referendum to create a Welsh assembly was “accepted by both sides” and the legitimacy of the vote was never questioned.

But when the relevant bill was put to the Commons after the Welsh referendum, many Tory MPs, including the then newly elected May, voted against it.

More uncomfortable still for May’s arguments against a second EU referendum, the Conservatives went into the 2005 general election with a manifesto pledging a new vote for the people on Wales, to include an option to abolish the assembly.

The emergence of the contradiction led to changes to parts of May’s speech on Monday, in which the prime minister urged MPs to back her deal and warned that if it were rejected, Brexit might not happen.

“On the rare occasions when parliament puts a question to the British people directly, we have always understood that their response carries a profound significance,” she said.

Extracts of the speech released overnight by No 10 had May arguing: “When the people of Wales voted by a margin of 0.3%, on a turnout of just over 50%, to endorse the creation of the Welsh assembly, that result was accepted by both sides and the popular legitimacy of that institution has never seriously been questioned.”

However, after journalists and academics questioned the veracity of this account, the paragraph was changed, removing the suggestion that the referendum result was accepted without question.

Instead, May said: “When the people of Wales voted by a margin of 0.3%, on a turnout of just over 50%, to endorse the creation of the Welsh assembly, that result was accepted by parliament.”

Parliamentary records show that in December 1999, May was among a large number of Conservative MPs who voted against the second reading of the government of Wales bill, as did Brexiters who strongly back the 2016 referendum result such as John Redwood and Owen Paterson.

The 2005 Conservative manifesto, under which May stood for re-election, with Michael Howard as party leader, stated: “In Wales we will work with the assembly and give the Welsh people a referendum on whether to keep the assembly in its current form, increase its powers or abolish it.”

Commentators noted that May and many other Conservatives also voted against the creation of a Scottish devolved assembly in 1997, despite the referendum on this being won by 74% to 26%.

It's fascinating because it's a lie: the Conservatives went into the 2005 election pledging a referendum on whether or not to scrap the Welsh Assembly. https://t.co/5Hl21x4iTe — Stephen Bush (@stephenkb) January 14, 2019