Tesla will open its North American electric vehicle charging network to cars from rival General Motors beginning in 2024, Tesla CEO Elon Musk and GM Chief Mary Barra announced Thursday.

Under the agreement -- which is similar to a collaboration unveiled last month between Ford and Tesla -- GM vehicle owners will have access to Tesla's 12,000 "superchargers," said a GM news release.

The Tesla network will initially require an adaptor for GM cars in 2024. But beginning in 2025, GM vehicles will be built with direct access to the Tesla system without an adaptor, GM said.

Barra, who appeared with Musk for a six-minute conversation on Twitter Spaces, alluded to consumer concerns about being stranded without access to chargers.

"This gives us a huge opportunity to do something that's better for customers and to drive the standard," Barra said.

Musk said he was "incredibly excited" to partner with GM. "It's just really making a fantastic electric vehicle experience whether somebody is driving a car from GM or from Tesla."

Musk in February pledged to make Tesla's US charging network available to other electric vehicle brands following White House negotiations.

Tesla agreed to make at least 7,500 chargers nationwide open to non-Tesla EVs by the end of 2024.