By Michael Hernandez</p> <p>WASHINGTON (AA) - U.S. President Donald Trump appeared to justify Wednesday the Soviet Union's invasion of Afghanistan, likely confusing the conflict with that in Chechnya. </p> <p>"The reason Russia was in Afghanistan was because terrorists were going into Russia. They were right to be there," Trump told reporters at the White House. "The problem is it was a tough fight, and literally they went bankrupt. They went into being called Russia again as opposed to being called the Soviet Union." </p> <p>Moscow's invasion has been cited as one of the contributing factors to the Soviet Union's collapse. </p> <p>The Soviets invaded the Central Asian country in 1979 in order to install a friendly government there.</p> <p>The U.S. and its allies backed anti-Soviet forces known as the Mujahideen in their war against the Soviet Army, arming and funding the group during the Soviet invasion. </p> <p>The Soviet Union fully withdrew from Afghanistan in 1989, and the pro-Soviet government it had installed there collapsed in 1992 following a civil war with the Mujahideen.</p> <p>Trump further called on Russia, India and Pakistan to take up the fight against the Taliban in Afghanistan, also slamming his former Secretary of Defense, James Mattis, who he said did not perform well in Afghanistan. </p> <p>"How has he done in Afghanistan? Not too good. Not too good. I'm not happy with what he's done in Afghanistan," he said. "President Obama fired him, and essentially so did I."</p> <p>Mattis resigned from his top Pentagon post in December over policy differences with the president.</p> <p>He was removed from his former post as head of U.S. Central Command in 2013 by then-President Barack Obama.