After years of enjoying a close relationship with the Obama administration and other Democratic leaders, Google’s parent company, Alphabet, is showing signs that it’s cozying up to Republicans as it adapts to new leadership in Washington.

But Alphabet also finds itself in a bit of a tricky position, trying to curry favor with a White House that has already put forth policies counter to the company’s culture and business interests, like the executive order signed on Friday that barred people from seven predominately Muslim countries.

On Monday, about 2,000 Google and Alphabet employees from around the world walked out to protest the immigration ban, and company leaders like Google CEO Sundar Pichai, cofounder Sergey Brin, and other execs spoke to those gathered.

It was the biggest anti-Trump demonstration from a tech company, following the flood of statements from practically every major CEO or leader in the industry.

For all the public displays of discontent, Alphabet is hardly shunning the new Republican-controlled government. As a for-profit public company with vast business interests tied to US policy, Alphabet can’t afford to disengage with the government. And as a result, the company is taking a more pragmatic approach behind the scenes, ramping up lobbying efforts in Washington and looking for ways to get closer to Donald Trump’s administration.

Getting closer to Republicans

At the end of last year, Alphabet parted ways with the Podesta Group, a Democratic-leaning lobbying firm led by Tony Podesta, the brother of Hillary Clinton campaign chairman John Podesta, Bloomberg reported.

Lees ook op Business Insider €50.000 bij je ouders lenen voor een verbouwing: familiebank kan gunstig zijn, maar kunnen pa een ma een boeterente opleggen als het misgaat?

Alphabet had worked with the Podesta Group for 12 years, and Bloomberg noted that the timing coincided with a job posting at Google for someone to spearhead “conservative outreach.” However, a person familiar with Alphabet’s relationship with the Podesta Group told Business Insider that the lobbying firm was the one that cut ties because it was asked to do so by Oracle, another big tech client that competes with Google.

The Podesta Group did not respond to multiple requests for comment.

This month, The New York Times reported that Google financed a swanky party in Washington in a partnership with the right-wing news outlet The Independent Journal Review. The party was the day after the new Congress’ first day, and most of the lawmakers in attendance were Republicans, The Times reported.

In December, Alphabet CEO Larry Page and Chairman Eric Schmidt attended the so-called tech summit at Trump Tower with Trump, along with other notable tech leaders like Apple CEO Tim Cook, Microsoft CEO Satya Nadella, and Tesla CEO Elon Musk.

But that meeting wasn’t the end. Schmidt was spotted in Trump Tower about a month after the tech summit, though it’s unclear what he and Trump discussed.

Schmidt also met with Republican Sen. John Thune, who chairs the Senate’s Commerce, Science, and Transportation Committee, and House Majority Leader Kevin McCarthy before visiting Trump Tower, according to The Times.

Foto: Alphabet CEO Larry Page, second from left, at the tech summit at Trump Tower in December. source Getty/ Drew Angerer

What does Alphabet have to gain?

Google has worked with both Republicans and Democrats in the past, and the company spends millions of dollars every year lobbying across both sides of the aisle. In 2016, Alphabet spent more than $15 million on government lobbying.

For Google and Alphabet, a lot is at stake.

Google was the target of a Federal Trade Commission investigation several years ago into alleged anticompetitive business practices. (The case was closed in 2013 without charges.) An unfriendly FTC in the new administration could potentially take another look at Google’s business practices, especially as the company continues to face antitrust investigations in Europe.

Peter Thiel, the tech billionaire and adviser to Trump, has criticized Google’s power in the past and is leading the search for a new chair of the FTC, according to BuzzFeed. BuzzFeed also reported that Schmidt has had trouble gaining favor with the Trump administration and that Google’s preferred candidate for FTC chair, Joshua Wright, is unlikely to be picked.

But Thiel has written about the merits of monopoly power, so there’s a chance his FTC pick wouldn’t want to go after Google again.

It wasn’t always this way

Although Google’s Washington, DC, office has plenty of Republican staffers – including former Republican Rep. Susan Molinari, who runs the office – the perception has been that Google’s activities leaned more to the Democratic side of the political aisle, especially during Barack Obama’s administration.

For example, Obama hired longtime Googler Megan Smith as White House CTO. Google also hired Obama’s former deputy national security adviser, Caroline Atkinson to run public policy. And Schmidt served on Obama’s science and technology presidential advisory board.

“We’ve worked with both Republicans and Democrats for over a decade, advocating policies to encourage economic growth, innovation, and entrepreneurialism,” Molinari said in a statement to Business Insider. “We’ll continue to do exactly that.”

Schmidt also had ties to Hillary Clinton’s presidential campaign, giving funding to a software company called Groundwork that provided technical services for the campaign. Schmidt was even spotted wearing a “staff” badge at what was supposed to be Clinton’s election night victory party – something that caught the attention of WikiLeaks and conservative media outlets.

Photo of Google/Alphabet Chairman Eric Schmidt wearing Clinton campaign "staff" badge pic.twitter.com/uZANaEwOPD — WikiLeaks (@wikileaks) November 17, 2016

Recent resistance

Despite the efforts to get closer to Republicans, Google is bristling at some of the new administration’s policies.

Pichai sent a memo to staff last weekend criticizing Trump’s executive order that barred immigrants and refugees. Brin was spotted at San Francisco’s airport protesting the immigration ban, and he spoke forcefully against the ban at a rally at Google headquarters on Monday.

Google cofounder Sergey Brin at SFO protest: "I'm here because I'm a refugee." (Photo from Matt Kang/Forbes) pic.twitter.com/GwhsSwDPLT — Ryan Mac (@RMac18) January 29, 2017

Monday’s protest at Google campuses across the world flooded social media with photos and videos of cheering employees and company leaders slamming the Trump administration’s immigration ban. Soufi Esmaeilzadeh, an Iranian-born Google employee, told her story to those gathered at the company’s Mountain View, California, campus.

Foto: Google Product Manager Soufi Esmaeilzadeh.sourceGoogle

Esmaeilzadeh was flying from San Francisco to Zurich when Trump signed the executive order. After contacting Google’s immigration team, she was told it would be best to stay in Zurich indefinitely because she could risk deportation if she came back to the US.

When a federal judge blocked part of the order on Saturday night, Google booked Esmaeilzadeh a flight back to San Francisco.

Brin, himself a refugee who came to the US from the Soviet Union during the Cold War, delivered the strongest words during the demonstration.

“I think it’s important to not frame this debate as being ‘liberal’ versus ‘Republican’ and so forth,” Brin said. “It’s a debate about fundamental values, about thoughtful policymaking and many of the other things that I think are apparently not universally adored, but I think the vast majority of our country and our legislators and so forth support.”

(Here’s a full transcript of Brin’s remarks.)

Schmidt also spoke out against the same administration he has tried to get close to at a meeting with Google employees on Thursday, according to BuzzFeed. Schmidt said he thought the Trump administration would continue to do “these evil things” like ban immigration, according to the report.

And Google is donating $2 million itself and another $2 million from employees to the American Civil Liberties Union and other groups to battle Trump’s immigration ban.

Another fight brewing

Concerns are likely to grow at Google and other large tech companies as the Trump administration considers changes to the H-1B visa program, which allows companies to hire workers from other countries and bring them to the US. As Bloomberg reported, those changes would require companies to prioritize American hires.

Such an order could severely limit tech companies’ ability to recruit the talent it needs. Google, Facebook, Amazon, IBM, Apple, and just about any other tech company you can think of are consistently among the top sponsors of H-1B visa holders, according to My Visa Jobs.

Business Insider has reached out to major tech companies regarding potential changes to the H-1B visa program. All have either not responded or declined to comment until more information is available.

If you have an information about how Alphabet’s leadership is handling Trump administration policies, you can anonymously email skovach@businessinsider.com.