South Korea will ban driving recalled BMWs that haven't received safety checks following dozens of fires the German automaker has blamed on a faulty exhaust gas component.

South Korea's Ministry of Land, Infrastructure and Transport said Tuesday the ban taking effect Wednesday affects about 20,000 vehicles.

Drivers cannot use the cars except for taking them to safety checks. While violating the ban is punishable by up to one year in prison, the ministry said the focus will be on persuading drivers to take their vehicles for safety checks as soon as possible. However, the government will "aggressively" pursue charges against drivers if their vehicles catch fire after they had continuously defied the ban, ministry official Kim Gyeong-wook said.

Get Breaking News Delivered to Your Inbox

Junghyun Kim, an official from BMW's South Korean unit, said the company has currently secured more than 14,000 cars it will lend to affected drivers for free until their BMWs are cleared to drive again.

"We will do our best with the safety checks to reduce the number of drivers affected by the ban," she said.

Nearly 40 fires of BMW vehicles this year are suspected to have been caused by engine problems. Images and videos of BMW sedans engulfed in smoke and gutted by fires caused alarm among drivers. Some parking lots reportedly refused to let in BMW drivers and other drivers said they were trying to avoid BMWs on the road. A group of angry BMW owners filed a complaint with Seoul police earlier this month, saying that the German automaker was reacting too slowly to address the problem.

BMW last month recalled about 106,000 vehicles of 42 different models. The company has identified the cause of the engine fires as leaks of glycol coolant in their exhaust gas recirculation (EGR) coolers. Combined with carbon and oil sediment the leaks could combust and cause fires when the vehicles were driven at high speeds for long periods of time. Such fires can occur only when the vehicles are being driven.

BMW AG's Korean unit earlier apologized over the fires.

The company is still investigating why South Korea saw so many such incidents this summer. BMW is recalling about 323,000 vehicles across Europe over concerns about the same exhaust component, but the company isn't yet sure whether EGR coolers have caused fires outside of South Korea, said Junghyun Kim, the South Korean BMW official. Overall, engine failure rates in South Korea were no more numerous than in other countries where BMW has used the same software and hardware, BMW has said.

The ministry says 27,000 recalled cars hadn't received safety checks as of Monday but it expected a portion of them to be checked before the ban goes into effect.

Earlier this month, BMW AG said its investigations had found similar malfunctions that could, "in rare cases," cause fires in some BMW diesel vehicles in the European market.