Hapag-Lloyd is investigating why one of its containerships brushed along the side of another boxship moored in Pakistan's Port of Karachi.

"We will have a close look for sure to make sure it doesn't happen again," spokeswoman Monika Gabler said. "We are investigating it."

Hapag-Lloyd's 8,063-teu Tolten (built 2012) on Monday scraped along the starboard side of the 6,350-teu Hamburg Bay, owned by Lombard Corporate Finance.

In a statement, the company said that it "deeply regrets" that the accident happened.

"We have ascertained on-site that no one was injured as a result of the incident, and that there has been absolutely no environmental pollution," Hapag-Lloyd said.

"There is yet to be a definitive explanation for this incident," the company added.

It said the boxship owner will conduct an "in-depth investigation of the incident" and is working on getting the ship back on its way as soon as possible.

The accident caused at least 20 containers to go into the water, and the port was closed while the boxes were retrieved.

Gabler said the accident occurred in the afternoon and confirmed 21 boxes went overboard. A "few other" boxes were damaged, she said.

"We don't know whose fault it is," she said.

The Tolten came from the port of Jebel Ali in the United Arab Emirates and was on its way to India's Mundra Port, she said.