President Barack Obama warned that the United States and the international community will be “forced to apply a cost” if Russia continues its involvement in Ukraine, he said Wednesday after hosting Ukrainian Prime Minister Arseniy Yatsenyuk in the Oval Office.

“There’s another path available and we hope that President Putin is willing to seize that path,” Obama said of Russia’s leader. “But if he does not, I’m very confident that the international community will stand firmly behind the Ukrainian government.”

Obama said that he and the international community “completely reject” Crimea’s weekend vote on whether to secede from Ukraine, dismissing it as a “slapdash election.”

The president praised Yatsenyuk and “the courage of the Ukrainian people standing up on behalf of democracy.”

Yatsenyuk said that he and his allies won’t yield to Russian pressure. “Ukraine is and will be part of the Western world,” he said.

“My country feels that the United States stands by the Ukrainian people,” he said. “Mr. President, it’s all about freedom. We fight for our freedom, we fight for our independence, we fight for our sovereignty and we will never surrender.”

Speaking briefly after the meeting to reporters outside the West Wing, Yatsunyuk said there’s a “need to stop the Russian military.” Echoing Ronald Reagan, he added: “Mr. Putin tear down this wall … of aggression and military action.”

Vice President Joe Biden, Secretary of State John Kerry and Treasury Secretary Jack Lew were also in the room for the Oval Office meeting. Before the White House meeting, Kerry hosted Yatsenyuk at the State Department. On Friday, Kerry will travel to London to meet with Russian Foreign Minister Sergey Lavrov in an effort to ease tensions ahead of Crimea’s weekend vote.

Obama said he wasn’t particularly optimistic about Friday’s meeting, but added: “we’ll keep on pressing.”

The White House hopes that Yatsenyuk’s visit will be a clear signal to Russia and the international community that the United States “strongly support[s] Ukraine, the Ukrainian people, and the legitimacy of the new Ukrainian government,” press secretary Jay Carney said Tuesday.