TOKYO -- Honda Motor Co. of Japan and U.S. automaker General Motors Co. agreed Thursday to work together in developing batteries for electric vehicles, mainly for the North American market.

The companies will collaborate based on GM's next-generation battery system, both sides said. That will allow both manufacturers to continue to keep distinct products, while saving on costs for customers, they said.

Detroit-based GM and Tokyo-based Honda already work together on fuel cell vehicles, which are zero-emission and run on the power created when hydrogen fuel combines with oxygen in the air to produce water.

They have a manufacturing joint venture to produce a hydrogen fuel cell system in 2020, including trying to make fuel cells and hydrogen storage more affordable.

They also both have electric vehicles in their model lineup.

Pressure is growing on automakers to become more environmentally friendly as well as develop other technology for vehicles such as semi-autonomous driving.

Nissan Motor Co., one of the leaders in electric vehicles, is working with partner Renault SA of France on electric vehicle technology, while Toyota Motor Corp. is working with Japanese rival Mazda Motor Corp.

"This new, multiyear agreement with Honda further demonstrates General Motors' capability to innovate toward a profitable electric portfolio," said Mark Reuss, General Motors Executive Vice-President.