Conservative Liberal MPs are accusing Prime Minister Scott Morrison of creating a political disaster out of religious schools’ policies on homosexuality after he blindsided his party on the issue for a second time.

Some Liberals who remain opposed to same-sex marriage are blaming Morrison for turning the review of religious freedoms – commissioned a year ago during the marriage postal survey, ostensibly to ease their concerns – into an albatross that is damaging the government.

In a tense exchange in his office on Wednesday morning, Morrison accused the group of potentially doing more damage to the government by wanting it to vote against LGBTQIA children.

The tension with the conservatives on his own side came as Morrison and Opposition Leader Bill Shorten and their parties used procedural manoeuvres on the last day of parliament for the year to try to embarrass one another on national security and refugee policy.

The session ended with the government shutting down the house of representatives to avoid losing a vote aimed at forcing the government to act on medical advice and bring all children and unwell adults in immigration detention on Nauru and Manus Island to Australia.

Had the bill proceeded, and the Coalition been defeated, it would have been the first time a government had lost a legislative vote in the house in almost 100 years.

In a bid to try to force the government to allow the vote, Labor delayed another bill that gives security agencies the power to access encrypted communications, such as conversations on WhatsApp, Signal and Wickr.

Morrison and Home Affairs Minister Peter Dutton had demanded the bipartisan joint committee on intelligence and security speed up its examination of the bill – during which concerns were expressed by the government’s security watchdog bodies and digital technology companies – to get it passed before Christmas. The pair accused Labor of jeopardising national security by wanting to scrutinise it closely.

The committee finished its work as requested and reported to parliament on Wednesday night, recommending a raft of amendments that the government adopted.

But Labor then sought to add more amendments in the senate to try to have both that bill and the refugee bill – modelled on one produced by Wentworth independent Kerryn Phelps, but voted down on Monday – sent back to the house for the required final endorsement.

Accepting the first would have forced the government to also accept the second and exposed it to the risk of losing the refugee vote, resulting in the Morrison government’s humiliation.

As a result, the government chose to shut down the house of representatives instead.

After that, Labor abandoned its extra senate amendments on the encryption bill, meaning it no longer needed to go back to the house of representatives again and will now become law. That enables the Opposition to avoid being accused of jeopardising Australia’s safety by not facilitating passage of the bill.

Earlier, Morrison had called a news conference to claim the high moral ground on the whole situation and launch a blistering attack on Shorten along those lines.

“This is about Australia’s national security, it’s not about what happens on the floor of the house or the floor of the senate,” he insisted.

“You’ve got to look past Canberra. This is about Australia’s safety and Bill Shorten is a clear and present threat to Australia’s safety because he is so obsessed with politics that he cannot see the national interest.”

Morrison accused Labor of turning the parliament into “reality television” through stunts.

When it became clear that the government would not allow either bill to return to the house, the manager of Opposition business, Tony Burke, condemned the decision.

“This government just gave up and this government just decided that everything we were told for the last two weeks was not true,” Burke told parliament.

“They decided the price of following medical advice on Nauru was so high that they would rather not go through with encryption legislation … If you can’t face the parliament, you can’t govern.”

It was a chaotic end to a chaotic week, especially for the Coalition and its new prime minister. However, the final sitting day exposed Labor to criticism that it, too, was playing politics.

Earlier in the week, Morrison attracted criticism from some of his colleagues over proposed legislation that would give the government the power to force big electricity companies to divest, if they did not lower their prices.

While some Liberals supported the move – made in the absence of any other government energy policy – others remain concerned that it went against the Liberals’ pro-business ethos, and the government was forced to amend it.

With Thursday’s parliamentary shutdown, that bill did not make it into law, either.

Morrison surprised his colleagues further on Wednesday by producing a private member’s bill aimed at entrenching exemptions for religious schools from the Sex Discrimination Act and announcing it would be put to a conscience vote in parliament – without having consulted the Coalition party room first.

Key conservative senators had already laid out their positions on religious freedoms during their regular Coalition senators’ meeting, after Labor had produced a bill that would have removed the exemptions and, the conservatives feared, extended the anti-discrimination protections for LGBTQIA students, teachers and other staff at religious schools.

During the meeting, government senate leader and finance minister Mathias Cormann revealed the government planned to move amendments to negate the bill’s impact.

Cormann also mentioned the possibility of a conscience vote, something the conservatives opposed.

On Tuesday night, they demanded a meeting with Cormann and Attorney-General Christian Porter to clarify the government’s position and to lay out their concerns more fully.

At the meeting in Cormann’s office, the conservatives said if the amendments didn’t pass, the government should vote against Labor’s bill.

During that meeting, Cormann revealed that Morrison had produced his own bill. The conservatives were irate, believing he had made another captain’s call and betrayed them by not endorsing a conservative position, having supported the religious freedom review’s establishment – and having himself proposed former attorney-general and immigration minister Philip Ruddock as its chair – but continuing to refuse to release it.

Morrison now says he will release both the review and a government response before year’s end.

The production of his private member’s bill, which went nowhere after Labor refused to agree to a conscience vote, followed the leak during the Wentworth byelection campaign of part of the religious freedom review.

The leak drew attention to the little-known – and little-used – existing exemption for religious schools that meant they were legally able to discriminate against LGBTQIA students and teachers. In the wake of the leak, and during a campaign for a seat that had strongly supported same-sex marriage, Morrison announced he would legislate to remove the exemption by the end of the year.

It was an announcement that also had not been put to the party room first and which also angered the Liberals’ conservative wing.

When, after losing Wentworth, Morrison had not acted on his promise by the start of the final parliamentary week, Labor’s senate leader Penny Wong brought forward her own bill to effect it.

After the Tuesday night meeting between Cormann, Porter and the group of conservatives, Morrison invited a smaller group of conservative Liberals to his office on Wednesday morning.

The Saturday Paper has been told he accused them of wanting the government to vote against LGBTQIA kids. It’s understood they replied they were just concerned about the lack of proper process.

But it was not until Morrison called a news conference soon after to announce his own private member’s bill that they discovered it would definitely be subject to a conscience vote.

The conservatives say this has reopened a sensitive issue, angering conservative religious leaders and leaving the government facing allegations that it does not have a clear position.

One conservative Liberal told The Saturday Paper: “When you have no direction and you let something as sensitive as this stray the way it has, then you have to wear the consequences.”

Liberals’ anger and frustration at former prime minister Malcolm Turnbull also increased this week after his interventions in defence of his national energy guarantee policy, now abandoned by the Coalition and adopted by Labor.

Turnbull re-entered public debate with a vengeance, giving a speech in Sydney at which he advocated the re-adoption of the policy that led to his demise. That prompted even some of his closest supporters to suggest it was time for him to stop talking.

Just before the parliament went quiet on Thursday, Morrison rose to begin the traditional valedictory speeches.

“Well, ho, ho, ho,” Morrison said flatly and with considerable irony, before declaring this “the most joyous time of the year”.

Only, possibly, because it’s almost over.