Porsche is ditching diesel for good.

The automaker announced Sunday that it would focus on hybrid and electric technology and will no longer make diesel-powered vehicles.

The announcement comes five months after a senior manager at Porsche in Germany was arrested in connection with an investigation into diesel emissions rigging by Porsche's parent company, Volkswagen.

Just 12% of Porsche's global sales came from diesel cars in 2017. The company hasn't had a diesel car in its portfolio since February and hasn't offered a diesel model in the United States since November of 2015, a Porsche spokesperson told CNN.

Porsche said in a press release that demand for electric and hybrid vehicles has soared, but the market for diesel is shrinking.

"Due to this change in conditions, the company has decided to no longer offer diesel propulsion in future," the company said.

Oliver Blume, chief executive of Porsche AG, said in a statement that Porsche "is not demonizing diesel."

"It is, and will remain, an important propulsion technology. We as a sports car manufacturer, however, for whom diesel has always played a secondary role, have come to the conclusion that we would like our future to be diesel-free," he said.

Diesel has never been a major part of Porsche's portfolio. The automaker offered diesel versions of some of its four-door models, but the company has stuck to gasoline for its sports cars.

In its press release, Porsche touted the introduction of the Taycan, the brand's first all-electric model that will compete with Tesla in the luxury EV market. The Taycan will debut in 2019.

"By 2025, every second new Porsche vehicle could have an electric drive -- either hybrid or purely electric," the company said.

Volkswagen became the center of an explosive scandal about two years ago for rigging diesel cars to cheat environmental regulation tests. It led to the ouster of its CEO and a string of legal battles in the United States and abroad.

—Peter Valdes-Dapena contributed to this report.