As countries impose sanctions and seek to isolate Vladimir Putin, Khan became the first leader to sign a new trade deal with Russia since the attack.
He said the pair had “great discussions” on his visit to Moscow last week, which took place as Putin launched the invasion.
They signed a bilateral agreement and Khan also agreed to import two million tons of wheat from Russia.
He defended the deal in a televised speech to the nation, saying Pakistan had needed it.
“We have signed agreements with them to import natural gas because Pakistan’s own gas reserves are depleting,” he said.
“Inshallah (God willing), the time will tell that we have had great discussions.”
Khan has expressed concern over the invasion of Ukraine, but fallen short of denouncing it.
A post-meeting statement said Khan told Putin he “regretted the latest situation between Russia and Ukraine” and had hoped “diplomacy could avert a military conflict.”
Now, the top diplomats of 22 countries have called on Pakistan to support a resolution condemning Russia’s aggression against Ukraine in the United Nations General Assembly.
Last week, Russian state media broadcast images of Mr Khan and Mr Putin shaking hands and sitting down together in Moscow, hours after Putin gave a televised address effectively declaring war on Ukraine.
Mr Khan arrived in Moscow late on Wednesday, going ahead with a planned trip on the eve of the invasion.
The prime minister was heard in a video clip telling Russian officials on his arrival that it was a time of “so much excitement”.
“What a time I have come... so much excitement,” Mr Khan can be heard saying in the clip shared on social media.
The US reacted angrily to the news of Mr Khan’s visit even before Russia’s invasion of Ukraine began, saying the onus was on every “responsible” country to voice objection to Mr Putin’s actions.
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies