Updated with comments from Facebook spokesperson.

The tech companies opposing President Trump's immigration ban in court gave thousands of dollars to his nomination convention and inauguration.

Ninety-seven tech firms signed onto a legal brief filed over the weekend calling for the Ninth Circuit Court of Appeals to deny the Trump administration's motion to reinstate a ban on travel from seven Muslim-majority countries, arguing that the January 27 executive order one that "inflicts significant harm" on American business and innovation and violates the U.S. Constitution. Many of the companies that signed on gave major donations to the Republican National Convention and Trump's inauguration, both of which took place long after the real estate magnate first called for a ban on Muslim immigration on the campaign trail.

Lobbying disclosures revealed Microsoft (MSFT) - Get Report gave $500,000 to Trump's inauguration festivities, half in cash and half in "in-kind contribution, products and services," reports the Center for Public Integrity

A brochure obtained by the publication found major donors were being offered major perks for their contributions. Those giving over $500,000 got an invite to an "intimate dinner" with Vice President Mike Pence and his wife and tickets to several other inaugural events.

Trump's inauguration committee doesn't have to file detailed reports listing contributors until 90 days after the January 20 event. The planning group told The New York Times it raised more than $100 million. 

Federal Election Commission filings show Microsoft and other tech companies now opposing the travel ban contributed to the Cleveland 2016 Host Committee that organized the Republican National Convention in July. Microsoft contributed $1.8 million in in-kind software and software licensing. Prior to the RNC, the Redmond, Washington-based company clarified it would not be making a cash donation to the RNC but left the door open for doing so for the Democratic convention.

Facebook (FB) - Get Report gave $1 million to the RNC host committee, and Alphabet's (GOOGL) - Get Report Google gave $500,000. Twitter (TWTR) - Get Report donated $250,000.

To be sure, all four companies gave to the Democratic National Convention in Philadelphia as well. Prior to the convention, Facebook and Google defended their decisions to contribute to both conventions.

And, the companies and their leaders have clashed with Trump. Zuckerberg criticized Trump's call for a wall at a developer conference in April. Twitter refused to run an emoji version of the hashtag #CrookedHillary during the campaign, resulting in its exclusion from the Trump tech meeting in December.

Representatives for Microsoft and Google did not return requests for comment.

Twitter spokesman Nu Wesler pointed to a website disclosing all of the company's political giving and a statement given to The Hill last year, when he said, "Twitter works with both major political parties and we will support both national conventions, in order to promote civic engagement and democratic participation."

A Facebook spokesperson said the company "supported both the Democratic and Republican conventions in a similar manner and without endorsing any one candidate, issue, or political party. Having a presence at each convention allowed us to facilitate an open dialogue among voters, candidates, and elected officials during the conventions, just as we had during other critical moments in the U.S. elections and in elections around the world." 

Trump's inflammatory remarks on the campaign trail were cause for consternation in corporate America, and many companies were pressured to scale back or withhold funding for the GOP convention. Some were swayed.

Apple (AAPL) - Get Report , which signed onto the immigration ban letter, did not contribute to either convention's host committee, according to FEC filings. Airbnb, another signatory that aired an ad apparently aimed at Trump's executive order, gave $100,000 to the Democratic host committee but not to the GOP.

The tech community is one of a number of parties that have come out in opposition to Trump's January 27 executive order, which temporarily bars entry into the U.S. by people from seven countries -- Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen.

On Monday afternoon, attorneys general from 16 states filed a brief supporting the lawsuit brought about by Washington state and Minnesota that resulted in Federal Judge James Robart in Seattle halting the enforcement of the order on Friday.

Microsoft last week asked the Trump administration to grant suspensions on the ban in a letter to Secretary of Homeland Security John Kelly and Secretary of State Rex Tillerson. Apple's Tim Cook, Facebook's Mark Zuckerberg and Sheryl Sandberg, Twitter's Jack Dorsey and Microsoft's Satya Nadella have all spoken out against the order.

But as Trump noted in a recent tweet, cracking down on immigration was "a big part" of his campaign.

Trump first called for a "total and complete shutdown" of Muslims entering the U.S. in December 2015.

When he announced his bid for the presidency in July 2015, he said Mexicans in the U.S. were bringing drugs and crime into the country and called them "rapists." During the same speech, he called for a wall at the U.S.-Mexico border that Mexico would pay for.

The president also called for a clampdown on H1-B visas, upon which a number of tech companies are heavily reliant, throughout Election 2016. On his campaign website, he referred to Florida Republican Marco Rubio as Zuckerberg's "personal Senator" over his support of H-1B visas.

As the tech community rallies to resist Trump's crackdown on immigration and worries it's bad for business, they might be regretting the checks they wrote in support of him during the campaign.