For weeks, former president Barack Obama has chosen not to respond to the taunts as President Trump seeks to deflect responsibility for the widespread coronavirus outbreak in the United States by shifting some blame to his predecessor.

But on Tuesday, Obama appeared to fight back.

“We’ve seen all too terribly the consequences of those who denied warnings of a pandemic,” he wrote on Twitter to his nearly 115 million followers, in what could be read as a critique of Trump’s initial efforts to minimize the threat of the pathogen.

Linking to a news article about the Trump administration’s rollback of Obama-era rules to curb auto emissions, Obama added: “We can’t afford any more consequences of climate denial. All of us, especially young people, have to demand better of our government at every level and vote this fall.”

Though people close to the 44th president said the political nature of his message was aimed at holding a broad group of Republican politicians accountable for dismissing climate science, Obama’s decision to step into the political arena amid the lethal spread of the novel coronavirus represented a slight shift in his strategy over the past several weeks in which he has focused on playing a more neutral public role.

Confined to his Kaloroma home with wife Michelle Obama and their two daughters, Obama has told aides that he is determined to use his influential social media platforms to disseminate information — grounded in facts and science — to help the public stay safe, as well as to lift up examples of human empathy and goodwill in a national crisis.

People close to Obama, who spoke on the condition of anonymity to describe his views, said he also made clear he is not interested in getting sucked into a political catfight with Trump, leaving it to his former aides — most prominently Ron Klain, who served as Ebola czar in the Obama administration — to parry Trump’s partisan attacks and correct the public record over misinformation put out by the Trump White House.

“I think there’s a tricky balance here,” said Jen Psaki, a White House communications director under Obama. “As much as former president Obama has an enormous microphone and people still look to hear what he has to say, he also, especially at a time of global crisis, does not want to create a moment that’s perceived as political — a battle between a former Democratic president and a sitting Republican president, even if President Trump is completely mishandling this.”

Yet Trump’s allies quickly seized on Obama’s tweet Tuesday to amplify the political fight in a presidential election year. Sen. Ted Cruz (R-Tex.) sarcastically suggested that Obama was calling for “the overwhelming electoral defeat of Joe Biden & Nancy Pelosi” — the Democratic presidential delegate leader and Democratic House speaker — because they “opposed & demagogued Trump’s China travel ban, which helped slow the coronavirus pandemic.”

Judd Deere, a Trump White House spokesman, said in a statement: “It is unfortunate that the former president would rather try to create division instead of working to bring us together. During these uncertain times, Americans are receiving comfort, hope and resources from President Trump. The American people have tremendous spirit and they continue to respond to the president’s all-of-America call in unprecedented ways.”

Obama associates argued that his tweet was consistent with his pledge to speak out judiciously when Trump’s efforts to roll back his signature policies threaten to undermine the public good. Obama has mounted public defenses against the Trump administration’s bid to unwind the Affordable Care Act, the Paris climate accord, the Iran nuclear deal and a deferred action program for younger undocumented immigrants.

Yet the former president’s restraint at other times has frustrated some liberals, who have sought a powerful Democratic counterweight to Trump’s bully pulpit and willingness to sow disinformation. As the coronavirus crisis has accelerated, Biden and fellow Democratic presidential candidate Bernie Sanders, unable to campaign at rallies, have been confined to their homes and mostly drowned out by Trump’s televised White House briefings.

This month, Trump deflected criticism of his handling of the pandemic by criticizing Obama and Biden for their response to the H1N1 virus in 2009 and falsely accusing their administration of imposing burdensome regulations on the ability of private industry to create virus test kits.

Like most of the country, Obama has seen his public life curtailed. He and Pelosi were scheduled to participate in an event in March at American University to mark the 10th anniversary of the Affordable Care Act, but it was canceled.

Obama and his staff have privately deliberated over ways to more fully engage in the public discourse, according to people close to him. He has begun to increase the tempo of his tweets, linking to news articles on the importance of social distancing, the risks incurred by medical professionals and the efforts of grocery store workers, along with a list of charities.

On Monday, Obama tweeted a link to a local news story about 7-year-old Zohaib Begg of Loudoun County, Va., who had won praise for collecting donations from hotels of shower caps, gloves and face masks that could be used as protective gear by medical workers.

Aides said that Obama probably will step up his public posture in the coming weeks as the emotional, physical and financial toll of the crisis compounds. Among the ideas being discussed, according to people familiar with the process, are audio public service messages from Obama or personal conference calls from him and Michelle Obama to civic groups and front-line workers offering gratitude and moral support.

The former first couple already have engaged in calls with their personal staff, the Obama Foundation, and Higher Ground, their video production company.

Obama also weighed in last week during Golden State Warriors star Stephen Curry’s Instagram Live interview with Anthony S. Fauci, the director of the National Institute of Allergy and Infectious Diseases.

“Listen to the science. Do your part and take care of each other,” Obama wrote in the comments section of the Instagram feed. Obama played golf with Curry in 2016, but aides said the former president was not involved in arranging the interview. Rather, he wrote in to help draw attention to their conversation, the aides said.

“President Obama is using his online reach to share important resources and public health information and to lift up inspiring stories about heroic front-line workers and people pitching in to help their neighbors,” said Katie Hill, a spokeswoman for Obama. “He’ll continue to lend his voice throughout the pandemic and to remind Americans that we’ll get through this like we’ve done throughout our history: together, looking out for one another.”

But the path forward remains fluid.

Last week, Trump publicly touted his desire to ease up on some social distancing restrictions in an effort to reopen parts of the economy by Easter, against the warnings of the federal government’s own medical experts.

Obama linked to a New Yorker article describing hospitals being overwhelmed and warned in a tweet: “It’s only going to get harder across the country. Another reason to maintain social distancing policies at least until we have comprehensive testing in place. Not just for our sake — for theirs.”

Obama associates said the tweet was offered as a public safety guideline — and was not intended as a direct rebuke of Trump.

“I really think right now his mind-set is to try to draw attention to facts and data that can be used to make informed decisions in a subtle way,” said another person close to Obama. “He’ll adjust the tempo and rhythm as he feels appropriate, but I continue to imagine that even if he becomes more visible, it would be those lanes. His focus is that this crisis is not about him.”