Danish shipping and oil group A.P. Moller-Maersk agreed to sell a stake in the Yiantian container terminal in China to a unit of COSCO Pacific for $520 million, Maersk said.

"The transaction is expected to generate an accounting gain in the order of $300 to 400 million in 2010," Maersk said in a statement.

Maersk and a wholly owned subsidiary agreed to sell their 13.7 percent stake in Sigma Enterprises Ltd, which owns an interest in the Yantian terminal, to COSCO Pacific's Crestway International Ltd, Maersk said.

The transaction, which depends on consent from other Sigma shareholders and approvals from shareholders in COSCO Pacific and China COSCO Holdings Company Ltd , is expected to be completed by the end of July, Maersk said.

Maersk's APM Terminals has operations and holds stakes in terminals throughout China at the ports of Dalian, Guangzhou, Qingdao, Shanghai, Tianjin and Xiamen, it said.

"China is an important growth market for APM Terminals and we are dedicated to servicing the needs of our customers in China," APM Terminals Chief Executive Kim Fejfer said.

"We remain very positive on the container port market in China and globally," he said. "We will continue to seek investment opportunities in China and worldwide." (Reuters)