An Iowa high school teacher who was placed on administrative leave last week after he posted a threatening comment on social media about climate activist Greta Thunberg has resigned, the school district confirmed on Friday.

The teacher, Matt Baish, who taught chemistry at West High School in Waterloo, Iowa, said on Facebook on 2 October he would not attend a rally featuring Greta because he didn’t “have my sniper rifle.”

In a statement on Friday, the school, which announced on 4 October that Mr Baish had been placed on leave pending an investigation, said he had resigned on Thursday, effective immediately.

“West High School and the District are working to ensure classroom instruction continues for courses impacted by the departure,” Tara Thomas, a spokeswoman for the Waterloo Community School District, about 55 miles north of Cedar Rapids, said in the statement.

Mr Baish did not respond to calls or emails requesting comment on Friday.

Greta Thunberg inspires climate activists everywhere: In pictures Show all 12 1 /12 Greta Thunberg inspires climate activists everywhere: In pictures Greta Thunberg inspires climate activists everywhere: In pictures In the protest that started a movement, Greta skips school to sit outside of the Swedish parliament in Stockholm in order to raise awareness of climate change on 28 August 2018 Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta speaks at the World Economic Forum in Davos on 25 January AFP/Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta stages a protest at the World Economic Forum in Davos on 25 January Reuters Greta Thunberg inspires climate activists everywhere: In pictures Greta speaks at the House of Commons in London on 23 April PA Greta Thunberg inspires climate activists everywhere: In pictures Greta addresses to the occupation at Marble Arch in London on 21 April AFP/Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta meets the pope on a visit to Rome Reuters Greta Thunberg inspires climate activists everywhere: In pictures Greta speaks at the senate in Rome on 18 April Reuters Greta Thunberg inspires climate activists everywhere: In pictures Greta addresses a debate of the EU Environment, Public Health and Food Safety committee at the European Parliament in Strasbourg on 16 April AFP/Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta receives the Special Climate Protection Award at the German Film and Television awards in Berlin on 30 March AFP/Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta attends a children's climate protest in Berlin on 29 March AFP/Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta addresses a children's climate protest on 1 March in Hamburg Getty Greta Thunberg inspires climate activists everywhere: In pictures Greta attends a meeting for the Civil Society For rEUnaissance at the EU Charlemagne Building in Brussels on 21 February AFP/Getty

The episode began when Mason Severson, 27, a former student of Mr Baish’s, asked in a Facebook post on 2 October who was going to attend a climate strike rally in Iowa City on 4 October, where Thunberg — the 16-year-old climate activist whose one-person strikes in Stockholm last year helped ignite a global movement — was scheduled to speak.

Mr Baish responded, “don't have my sniper rifle,” in a comment that has since been deleted.

Two days after Mr Baish’s post, the Waterloo Education Association, the school district’s labour union, issued a statement: “In light of recent events, the WEA leadership team has informed Matt Baish he is no longer chief negotiator for WEA.”

After the school district’s announcement that Mr Baish was on administrative leave, the union warned on Facebook to be extremely careful “of what you put on social media” because of the potential consequences of what you say.