The House voted Thursday to fund Amazon’s capstone operations in the United States, a move that would be the first major step toward a full-fledged merger with the e-commerce giant.
The bill passed by a vote of 221-197, a vote that was largely along party lines, with Republicans holding a slim majority.
Amazon had threatened to file a lawsuit to block the measure.
The vote came as the company faces criticism over its handling of Hurricane Harvey.
President Donald Trump has called for Amazon to get out of the shipping business, but Amazon’s own CEO Jeff Bezos said in August that the company is doing “very well.”
Amazon, which has struggled to make money from its online marketplace, also has been criticized for not paying its workers as well as other companies that sell products online.
It has also been accused of retaliating against workers who have spoken out against the company.
Amazon is the nation’s second-largest online retailer after Walmart.
The House vote was the second big victory for Amazon in the last week.
In May, lawmakers passed legislation to help the struggling retailer in the face of mounting consumer complaints.
The company has been seeking an expansion into the retail market in the years since.
It’s also been trying to woo the tech sector in recent months.
Amazon has also filed an antitrust lawsuit against rival Apple, alleging the company illegally restricts customers’ ability to buy and sell its goods on its app store.
Apple’s chief executive, Tim Cook, said Thursday that the companies have agreed to work together to fight any future antitrust lawsuits.
He also said Amazon would continue to fight against any attempts by the Trump administration to impose a “soft landing” on the Amazon acquisition.