Longtime Conservative MP Tony Clement is resigning his post as his party's justice critic after admitting to sharing sexually explicit images and a video with an individual online.

"Over the last three weeks, I have shared sexually explicit images and a video of myself to someone who I believed was a consenting female recipient. The recipient was, in fact, an individual or party who targeted me for the purpose of financial extortion," Clement said in a statement.

"The RCMP are currently investigating the matter to determine the identity of the party responsible for the extortion attempt."

Clement, who has twice vied for the leadership of the federal party and served in senior cabinet positions in the former Conservative government, said in a statement late Tuesday he will be resigning his position on a number of Commons committees.

"I recognize now that I have gone down a wrong path and have exercised very poor judgment. First and foremost, I apologize to my family for the needless pain and humiliation my actions have caused," he said in the statement.

Clement is married.

"I also apologize to my colleagues and my constituents for letting them down. I am committed to seeking the help and treatment I need in my personal life to make sure this will not happen again while also continuing to discharge my duties as a Member of Parliament."

The scandal is a blow to Conservative Leader Andrew Scheer, who had tapped Clement to serve as the party's justice critic in the House — an important role, given the many changes to legislation Justice Minister Jody Wilson-Raybould has tabled in recent months.

In a follow-up statement sent shortly after Clement released his statement, Scheer said he had accepted Clement's resignation from his party duties.

"While I'm greatly disappointed with Mr. Clement's actions, I am encouraged that he has decided to seek help and I wish him all the best in doing so," Scheer said.

Lisa Raitt, the deputy leader of the Conservative Party, will assume the justice role effective immediately, Scheer said.

Clement is also a member of the top secret national security and intelligence committee — a special joint parliamentary committee composed of MPs and senators that oversees the work of the country's intelligence agencies, including the Canadian Security Intelligence Service (CSIS), the Communications Security Establishment, the Royal Canadian Mounted Police and the Canada Border Services Agency.

Clement was an early adopter of social media as a tool for political communication in Canada. He is a well-known presence on a variety of platforms and he follows tens of thousands of people on Twitter and the image-sharing app Instagram, often liking posts from acquaintances and strangers alike. He is known for both personal and private posts on the networking sites.

The Parry Sound-Muskoka MP was first elected to the House of Commons in 2006 after making the jump from provincial politics. Stephen Harper picked Clement for a number of senior cabinet positions in his government, including president of the Treasury Board and minister of industry.

The U.K.-born Clement was elected to Queen's Park in 1995. He held a number of cabinet portfolios under former Ontario premier Mike Harris, including minister of health, before the ruling PCs were voted out of office in 2003.

In 2004, he placed third in the leadership race, ultimately placing behind Harper and auto parts mogul Belinda Stronach.

He dropped out of the 2016 leadership race after three short months, having failed to raise enough money to continue his efforts.