Sprint and Japanese carrier SoftBank announced Wednesday that they have been granted approval for their merger from the Committee on Foreign Investment in the United States, after facing criticism from lawmakers about how foreign ownership of the U.S.’s third-largest wireless carrier might affect national security.

The companies said that they have signed a national security agreement with the government over the proposed $20 billion deal, and that CFIUS has found there are “no unresolved national security issues relating to the transaction.”

Lawmakers said they were concerned that SoftBank was closely tied to the Chinese government and that equipment in the company’s infrastructure might be compromised to facilitate cyberspying.

According to a filing at the Securities and Exchange Commission, Sprint and SoftBank will appoint an independent, voting member to its board who will serve as security director. This person, who must be approved by the government, will be charged with ensuring the agreement has been followed. He or she must have the appropriate security clearances and will be the government’s contact for all security-related issues.

The government will also have a right to approve and review certain Sprint vendors and service providers.

The agreement also includes some provisions dealing with Sprint’s planned takeover of a smaller carrier, Clearwire, which still requires approval from Clearwire’s shareholders. The government will have a one-time right to remove any equipment within the Sprint or Clearwire network by Dec. 31, 2016.

The Federal Communications Commission will now be able conduct an independent review of the proposed merger, having been asked to put its assessment on hold while the national security issues were considered.

Sprint and Softbank said in a joint statement that the companies anticipate they will close their deal by July 1, 2013..

Dish Network, which had run an ad campaign focused on worries about national security, also has a competing $25 billion bid for Sprint. As The Washington Post reported, CFIUS approval of the SoftBank proposal makes Dish’s offer less attractive because the proposed deal came later and faces potentially lengthy regulatory reviews.