T-Mobile and Sprint did not immediately respond to Reuters' requests for comment. The Justice Department declined to comment.
CNBC was the first to report the ultimatum.
In June, a group of US state attorneys general filed a lawsuit in federal court in New York to block the merger of the third and fourth largest US wireless carriers, arguing that the proposed $26 billion deal would cost consumers more than $4.5 billion annually.
To win over the Justice Department, which is not involved in the lawsuit, T-Mobile and Sprint have agreed to a series of deal concessions, including selling the prepaid brand Boost.
The companies have been in talks for weeks to sell Boost to Dish Network Corp but are haggling over issues such as restrictions over who can buy the divested assets if they are sold in the future. T-Mobile and Deutsche Telekom, which owns 63 percent of T-Mobile, are seeking to prevent them from going to a cable or technology company.
Sprint is controlled by Softbank Group Corp.
The companies told the court in late June that they were willing to refrain from closing the deal until after the state attorneys general case is completed.
The two companies have a July 29 deadline to complete the deal but are expected to extend it.
Federal Communications Commission Chairman Ajit Pai has given his blessing to the merger in principle and is expected to circulate a formal order within weeks.