Hyundai and Kia on Friday announced a deal to settle a lawsuit filed by car theft victims after a TikTok "challenge" showed how easy it was to steal some models.

The settlement could cost the South Korean car makers as much as $200 million, most of the money going to compensate people for theft-related losses, according to the companies.

It is up to a judge whether to approve the deal.

"This agreement is the latest step in a series of important actions that Kia has taken to help customers whose vehicles have been targeted by criminals using methods of theft popularized on social media," Kia America chief legal officer John Yoon said in a joint release.

Thefts of Kia and Hyundai cars in the United States spiked in the middle of last year after videos spread on TikTok showing how to easily steal some models, according to the companies.

Videos promoted a "Kia Challenge" that threw down a gauntlet to pull off such car theft, Hyundai and Kia said.

Car thefts linked to the challenge have resulted in at least 14 crashes and eight deaths, according to the US National Highway Traffic Safety Administration (NHTSA).

TikTok did not immediately reply to a request for comment.

The companies estimated about 9 million Hyundai and Kia vehicles currently on the road in the United States are or were "susceptible to these social media-promoted thefts."

"We appreciate the opportunity to provide additional support for our owners who have been impacted by increasing and persistent criminal activity targeting our vehicles," Hyundai Motor North America chief legal officer Jason Erb said.

Erb added that Hyundai will continue upgrading car software, distributing steering wheel locks, and helping car owners who are having trouble finding insurance due to theft risk.

Kia is taking similar actions, Kia America chief legal officer John Yoon said.

Hyundai and Kia have updated anti-theft software and provided tens of thousands of steering wheel locks to car owners in US states, according to the NHTSA.