The tech industry is spending big in President Trump's Washington.

Google (GOOGL), Apple (AAPL), Amazon and Uber all spent record amounts lobbying federal officials during the three months that ended in June, according to new lobbying disclosures.

Google, typically one of the top spenders in Washington, pumped nearly $6 million into its lobbying efforts for the three-month period. That's up from $4.2 million in the same quarter a year earlier.

Amazon and Apple spent $3.2 million and $2.2 million on lobbying, respectively. Uber, the youngest of the four companies, spent $430,000.

The increased lobbying bills come at a time when Silicon Valley is clashing with the Trump administration over its policies on immigration, climate change, net neutrality and trade.

Google, Apple and Amazon (AMZN) each lobbied for immigration issues during the quarter, including "high-skilled immigration," according to the disclosures, which were released Thursday. The Trump administration has riled the tech industry with the travel ban and plans for H-1B visa reform.

The three companies also spent on corporate tax reform. Apple, Google and others in the industry currently have hundreds of billions stashed away overseas and stand to benefit from Trump's tax proposals.

Related: Silicon Valley's impossible balancing act with Trump

In the six months since Trump took office, the big tech companies have struggled to build bridges to the new administration without damaging their standing with progressive customers and employees.

Last month, top tech CEOs met with Trump and his advisers. The agenda: modernizing the government's technology infrastructure. One tech lobbyist described it as "safe ground" for the two camps to meet and discuss other issues.

Lobbying the White House, federal agencies and members of Congress is another way for the industry to find its footing. Some, like Amazon, are beginning to turn to lobbyists with connections to Trump.

For Amazon and Google, there may be even greater urgency to strengthen relationships in Washington.

Amazon acquired Whole Foods (WFM) last month in a blockbuster deal that will likely require regulatory scrutiny. Trump has repeatedly gone after Amazon and its founder Jeff Bezos, saying the company has "a huge antitrust problem."

Google was recently hit with a record antitrust fine by European Union regulators, with the potential for additional fines to come. Among Google's lobbying issues for the quarter: "antitrust law, domestically and internationally."

Amazon, Google and Uber declined to comment. Apple did not immediately respond to requests for comment.