Hewlett-Packard Co. said late Thursday that it would stop a distributor from selling its products in Iran.

The computer and printer maker acknowledged that it knew the sales were occurring despite trade sanctions on Iran, but maintained it did nothing illegal and was halting the practice "to go beyond the letter of the law."

The Boston Globe reported last week that HP could be in violation of U.S. export laws because of an arrangement it had with Redington Gulf, a technology distributor in the Middle East, to sell HP printers in Iran.

HP said at the time and reiterated Thursday that it complies will all export laws. But in a short statement provided to The Associated Press, HP said it would clarify contracts with its distributors "to explicitly prohibit the sale of HP products in Iran."

• Click here to read the original Boston Globe story.

• Click here for FOXNews.com's Personal Technology Center.

• Got tech questions? Ask our experts at FoxNews.com's Tech Q&A.

HP said it would more closely monitor its distributors.

"Having recently examined the situation, we believe it's important to go beyond the letter of the law," HP's statement said.

The company emphasized that it never shipped directly to Iran and doesn't have any employees there.

Even so, the Globe story noted that an HP manager had been quoted as calling Iran an important market. In 1999, HP's Middle East manager at the time estimated that sales in Iran would grow 50 percent a year, the Globe reported.

The paper also cited a 2007 poll conducted by a local news organization that estimated HP printers owned 41 percent of the market in Iran.

The sanctions against Iran were imposed because the U.S. government has identified Iran as a sponsor of terrorism. The rules prohibit anyone from exporting goods, technology or services from the U.S. if they know the products will end up in Iran.

There are exceptions, but those are mostly granted for food or medical supplies that can be shipped to Iran under a special license from the U.S. government, said Andrew DeSouza, a spokesman for the Treasury Department, which administers the sanctions.

Companies that want to ship other products to Iran, either directly or through a third party, have to submit to a governmental review or face steep penalties if they're found in violation, he said.

Criminal penalties can be up to 20 years in prison for people found in violation, with fines up to $1 million. Civil penalties can go as high as $250,000 or twice the value of the transaction in question.

DeSouza wouldn't say whether the Treasury Department is looking into HP.