BOSTON — U.S Sen. Elizabeth Warren went as hard against President Donald Trump as she did her opponent state Rep. Geoff Diehl on Friday night as the two candidates squared off for the first time over taxes, Saudi Arabia and transgender rights and Diehl tried to brand Warren as someone more interested in running for president than re-election.

Warren, who in recent weeks has acknowledged that she will take a "hard look" at running for president in 2020, lumped Diehl and Trump into the same bucket at almost every turn. Diehl, in turn, tried to steer the conversation back to Massachusetts, challenging Warren's travel out of state, her votes in the Senate and her possible designs on the White House in 2020, just two years into the six-year Senate term that she and Diehl are vying for.

"My opponent, Mr. Diehl, has said if elected he would have Donald Trump's back 100 percent of the time. Not me. I will be here for the people of Massachusetts," Warren said.

Diehl did not deny saying that he would back up the president in Congress, but said that doesn't mean he would vote with Trump on every issue. Challenged on proposals from Congressional Republicans to cut Medicare and Social Security, he also distanced himself from GOP leadership in the Senate.

"I am not a Mitch McConnell Republican. I am a Massachusetts Republican," said Diehl, who played an active role in Trump's 2016 campaign in Massachusetts. He said he didn't want to cut Social Security.

The debate hosted by WBZ-TV and moderated by Jon Keller was the first of three scheduled between Warren and Diehl, with the second planned for just two days later on Sunday night in Springfield. A third candidate in the race – independent Shiva Ayyadurai – was not invited to the debate because of his low standing in the polls.

"You're running for president"

The debate also came just days after Warren released the results of a DNA test showing that it is highly likely she has some Native American ancestry, hoping to put to bed questions about her heritage that have dogged her since 2012.

Diehl has not made the Native American question part of his campaign, but he did question on Friday whether Warren should have listed her heritage in a law school faculty directory. Warren, citing the DNA test and her release of 10 years of tax returns and her employment records, said she has nothing to hide. "I'm an open book," she said.

Diehl's name has been a talking point for much of the week, but not because of his campaign for Senate. Instead, Gov. Charlie Baker's endorsement and anticipated vote for the Trump-backing lawmaker from Whitman has become a wedge issue in the race for governor.

While the governor's race did not come up Friday night, the 2020 race for president was front and center.

"You're running for president. Everyone knows it at this point," Diehl said, adding, "You've been traveling so extensively around the country that I wonder if sometimes you know where the Massachusetts zip code is."

Warren countered with a defense of her work for Massachusetts, ticking off funding she helped secure to dredge Boston Harbor and rebuild bridges in Lowell and seawalls in Scituate. She also cited funding for student loan forgiveness and her efforts to defeat Trump's plan to cut National Institutes of Health research spending and instead win a budget increase that helps Massachusetts universities and hospitals.

In her first debate since her 2012 race against then-U.S. Sen. Scott Brown, Warren came prepared with quotes by Diehl printed out so that she could reference back, and spent much of the night on offense.

She forcefully challenged Diehl to release his tax returns, questioned why he didn't call out McConnell for proposing to cut Social Security, and accused him of giving Trump cover for a "limp response" to Saudi Arabia's alleged murder of Washington Post columnist.

At one point, she accused Diehl of attending a rally organized by ACT for America, which has been labeled by the Southern Poverty Law Center as an anti-Muslim organization. Diehl after the debate demanded an immediate apology from Warren, denying any association with the group and suggesting that Warren had confused him with Ayyudurai.

Diehl, however, did confirm that he had been at a "Back the Blue" rally in Bourne on April 22 as Warren said he had, based on a photo published in the Boston Broadside, which reported the event sponsor as ACT for America.

Much of the first half of the debate focused on taxes and the Republican tax reform bill that was signed by President Trump. Diehl credited the reform with helping to jolt the economy, help small businesses and drive down unemployment.

"We are seeing a tax reform bill that is giving Massachusetts unbelievable unemployment," said Diehl, referencing the state's 3.6 percent unemployment rate.

Warren, meanwhile, said that large corporations like Exxon are seeing the lion's share of the tax benefit while small business owners are paying "full freight" and wages are not growing.

"Government right now, with a Republican control, is working great for billionaires, for giant corporations. It's just not working for the rest of America," Warren said.

Diehl responded, "I think we're living in two different worlds."

As he has on the campaign trail, Diehl harshly criticized Warren for being the only vote in the Senate against the 21st Century Cures Act, which included money for opioid abuse treatment in Massachusetts. Warren reiterated that she voted against the bill because at the last minute "giveaways for drug companies were stuffed in."

Asked about the White House response to the apparent death of journalist Jamal Khashoggi in Turkey, Warren called his alleged murder an "attack on our democracy," while Diehl said Saudi Arabia is an important ally in the Middle East and an important business partner for local companies like Raytheon.

After the debate, he told reporters that the United States should respond "in an appropriate way and in a firm way" if it's proven that the Saudi Arabian government played a role in Khashoggi's death.

Both candidates were also asked about their positions on Question 3, which would repeal the Massachusetts law allowing transgender people to use the public facility that matches their gender identity.

Warren said she would vote to preserve the law, but Diehl said he thought anti-discrimination laws in Massachusetts were strong enough without introducing a "loophole" that could be exploited by a sexual predator.

"This is just ugly. Donald Trump is ugly on this topic. The vice president is ugly on this topic. And Geoff Diehl is ugly on this topic," Warren shot back.

Diehl got most animated talking about immigration and police, citing Warren's description of the criminal justice system as racist and her desire to abolish Immigration and Customs Enforcement as evidence that Warren disrespects law enforcement.

He also said, "I am all for people coming to America to try to live the American dream," but called for secure borders and legal immigration.

Before the debate, tensions outside the studio were running high. Large crowds of Warren and Diehl supporters lined the driveway where Diehl supporters were chanting, "Deal her out," a play off the Republican's name.

Warren arrived in a black SUV about an hour before the debate with her husband Bruce Mann. Jumping out of the car and onto a wooden crate, her staff handed her a bullhorn to address the crowd: "We are going to turn the House, the Senate and Washington back to the people," Warren said.

Warren got back into the car to be driven to the WBZ entrance when Ayyadurai, who was not allowed to participate in the debate due to his low polling average in the single digits, sat down in front of the vehicle and had to be dragged out of the way by police.