Bernie Sanders had a curt response for Donald Trump on Sunday, after the president noted the Vermont senator’s strong showing in the Democratic primary race and asked: “So what does this all mean?”

“It means you’re going to lose,” Sanders tweeted back.

The 78-year-old democratic socialist has rebounded from a heart attack last year, climbing polls of the Democratic field as the Iowa caucuses approach. In the realclearpolitics.com average for that state, which kicks off the primary on 3 February, Sanders leads the former South Bend, Indiana, mayor Pete Buttigieg by 21.3% to 21%.

In the same site’s average for New Hampshire, second to vote on 11 February, he leads former vice-president Joe Biden by 21.5% to 18.8%.

Biden leads the national average by nine points and had a boost in a Washington Post poll of African American voters released on Saturday, which put him 28 points ahead of Sanders nationally with that key voting bloc.

Changing tack after a screed of complaint about his looming impeachment trial, Trump tweeted on Sunday: “Wow! Crazy Bernie Sanders is surging in the polls, looking very good against his opponents in the Do Nothing Party. So what does this all mean? Stay tuned!”

In keeping his reply short and choosing not to tune into the abusive nickname the president has given him, Sanders had a little more success than House speaker Nancy Pelosi, who Trump earlier called “Crazy Nancy”.

Pelosi told ABC: “It’s Sunday morning. I’d like to talk about some more pleasant subjects than the erratic nature of this president … but he has to know that every knock from him is a boost.

“I don’t like to spend too much time on his crazy tweets, because everything he says is a projection. When he calls someone crazy, he knows that he is.”

If Trump’s tweet about Sanders was a projection of his fear of defeat in November, it may be that the president’s campaign team do not share it.

Speaking to the Guardian this weekend, Republican strategist turned Trump critic Rick Wilson said Sanders was the GOP’s “dream opponent”.

Sanders, Wilson said, was “the easiest person in the world to turn into the comic opera villain Republicans love to hate, the Castro sympathiser, the socialist, the Marxist, the guy who wants to put the aristos in the tumbril as they cart them off to the guillotine”.

Wilson also compared Sanders to Jeremy Corbyn, the British Labour party leader who lost a general election in December to Boris Johnson, “a very unlikeable PM [who] was able to convince a lot of Brits his opponent was too much of a risk.”

Sanders and his supporters show little sign of such concern. On Saturday, at slightly greater length, the senator tweeted: “Recently, our campaign has been the target of attacks from Trump and the Republican party – because they are catching on that our campaign is THE campaign that can and will defeat them.”

Realclearpolitics.com also runs polling averages matching Democrats with Trump in notional general elections. On Sunday, it gave Sanders victory by 2.6 points, 47.8% to 45.2%.

In the same average, Biden leads Trump by 4.5 points while Trump nudges out Warren by 0.2% and Buttigieg by a little over a point.