PlayStation 4. Pic: AP.

HONG KONG (AP) — Sony is joining forces with a state-owned company to make and sell PlayStations and games in China after the country dropped a longstanding ban on video game consoles.

In a filing Monday with the Shanghai stock exchange, Pearl Oriental said it signed a deal with the Japanese electronics giant.

Under the agreement, Sony and Pearl Oriental will set up two joint venture companies in Shanghai’s new free trade zone. Sony will have a 49 percent stake in one company and a 70 percent stake in the other.

Sony and rival Microsoft are scrambling to enter the market after Beijing in January ended the ban on game consoles, in place since 2000.

In April, Microsoft said it was partnering with BesTV New Media to sell Xbox One consoles in China.