Barack Obama delivered one of most powerful and important speeches of his presidency at the Islamic Society of Baltimore on Wednesday. It was powerful and important because of its historical depth. It was powerful and important because of its practical message. It was powerful and important because of its emotional range.

But it was also powerful and important because of its timing.

This was Obama’s first presidential visit to a mosque in the United States. Many Muslim Americans and advocates for religious pluralism had urged him to come sooner. But there can be no question that Wednesday’s appearance came at a necessary moment, and that the president used it to deliver a vital message.

Speaking at a point when anti-Muslim rhetoric is heard not merely on the fringe of our politics but in the thick of the campaign to choose the president’s successor, Obama did not merely give a great speech. He took a great stand.

The president, having pointed out that, “recently, we’ve heard inexcusable political rhetoric against Muslim Americans that has no place in our country,” went on to say, “We can’t be bystanders to bigotry. Together, we have to show that America truly protects all faiths.”

On the chance that anyone might miss the point of the president’s remarks, White House spokesman Josh Earnest previewed the speech by decrying the ugly rhetorical efforts of “some Republicans to try to marginalize law-abiding, patriotic Muslim Americans.”

“It’s just offensive to a lot of Americans who recognize that those kinds of cynical political tactics run directly contrary to the values that we hold dear in this country,” Earnest told reporters. “And I think the president is looking forward to the opportunity to make that point.”

Earnest did not name specific Republicans, and neither did the president. But no one who has been paying attention to the 2016 presidential race can be unaware of the fact that billionaire Donald Trump has said that he “would certainly implement” a database to track Muslims in America, and that the United States has “absolutely no choice” but to close some mosques. Around the same time that Trump was making his crude comments, Texas Senator Ted Cruz was talking up the notion that Christian refugees could be admitted to the United States while Muslim refugees might be barred. The supposedly more mainstream Marco Rubio has gone so far as to decry Obama’s efforts to address discrimination against Muslims, with the Florida senator calling it “cynicism” for the president “to spend a significant amount of time talking about discrimination against Muslims. Where is there widespread evidence that we have a problem in America with discrimination against Muslims?”

Rubio’s remarks were at odds with reality. In the same campaign season, in the same caucus and primary states where the Floridian has been campaigning, Vermont Senator Bernie Sanders said on Wednesday that he had spoken with Muslim Americans who are “frightened with all this hate talk going on.” And assessments by the Council on American-Islamic Relations and other groups have detailed rising numbers of attacks and threats against American Muslims and mosques in the aftermath of last fall’s terror attacks in Paris and San Bernardino. And, as The New York Times recalled Wednesday, “At a meeting at the White House last month, prominent Muslim Americans pleaded with senior administration officials to have the president visit a mosque in the hopes of stemming such attacks.”

The president has answered the call.

In his speech at the Islamic Center, Obama spoke about threats Muslim Americans have faced. And he decried them with inspired passion.

“We have to reaffirm that most fundamental of truths: We are all God’s children, all born equal with inherent dignity,” explained Obama, who added that, “as Americans, we have to stay true to our core values, that includes freedom of religion—for all faiths.”

“Muslim Americans are some of the most resilient and patriotic Americans you’ll ever meet,” said the president, who spoke in great detail of the long and rich history of Islam in America.

This was a speech that was of great political importance because, of course, it was about more than politics.

The president of the United States was delivering a message to all Americans, Democrats and Republicans, conservatives and liberals, people of all faiths and of all backgrounds.

There must be “no doubt,” said President Obama on Wednesday, “Islam has always been a part of America.”