Ferrari will build an electric supercar to take on Tesla

The luxury carmaker said it also plans to launch an SUV by the end of 2019 or early 2020.

All Ferraris will have some hybrid technology by 2019.

Ferrari is throwing down the gauntlet and challenging Tesla by jumping into the electric car space.

CEO Sergio Marchionne said on Tuesday at the Detroit auto show that the automaker plans to build an electric supercar, according to a Bloomberg report. Marchionne also said that the company plans to launch its first SUV by late 2019 or early 2020 and that the vehicle will be the fastest SUV on the market, according to the report.

"If there is an electric supercar to be built then Ferrari will be the first," Marchionne said.

"I think that there is now a view inside the house that electrification is a core skill that needs to be mastered and needs to be part of the offering of the combustion engine world," Marchionne said.

Ferrari isn't the only automaker investing in battery-powered cars, though.

According to a Reuters analysis, global carmakers have invested some $90 billion in electric vehicles. So once the automaker's first electric car hits the market, it will likely have some stiff competition.

In November, Tesla revealed it a new Roadster, which is set to launch in 2020. And Porsche is planning on rolling out its all-electric Mission E in 2019.