WASHINGTON — The company formerly known as Blackwater violated U.S. export control laws nearly 300 times, the State Department said Monday.

The alleged violations ranged from attempts to do business in Sudan while that country was under U.S. sanctions to training an Afghan border patrol official who was a native of Iran.

The charges were spelled out in documents released Monday by the State Department as part of a $42 million settlement with Blackwater that will allow the company, now known as Xe Services LLC, to continue receiving U.S. government contracts.

The agreement appears to spell the end of a three-and-a-half-year, multi-agency federal probe into Xe Services’ unauthorized exports of defense technologies and services. While elements of the case were presented to a federal grand jury, the company and its currently serving officers have avoided criminal prosecution.

The State Department said Monday that Xe Services’ alleged violations, while widespread, “did not involve sensitive technologies or cause a known harm to national security.” Additionally, it said, they took place while Xe “was providing services in support of U.S. government programs and military operations abroad.”

Under the agreement , the Moyock, N.C., company was levied a $42 million fine, but is allowed to use $12 million of that to strengthen its export control compliance programs.