When German academic Hajo Funke received word he was selected to be a visiting professor at the University of Virginia, he hastily began preparing. He arranged documentation to apply for a visa and delivered it to the U.S. Consulate in Berlin on Nov. 18, his 75th birthday. After an interview at the consulate in December, Funke rented an apartment in Charlottesville and arranged health insurance.

When the consulate returned his passport, it was accompanied not by a visa but by a letter that said a decision about his visa had been delayed for three to six months. The two classes he was set to teach — one on far-right populism and another on political memory in Germany — were in jeopardy.

On Thursday morning, after spending weeks teaching the course over video conferencing from his home and after an appeal from U-Va. officials, Funke got an email from the consulate saying his visa had been granted.

The news comes just in time for Funke to finish the academic term with his students. But questions have been raised about what prompted the delay, which was first reported by the Cavalier Daily, the independent student newspaper.

A State Department official declined to answer questions about Funke’s case, saying she is barred by law from commenting on individual visa cases.

“We are constantly working to find mechanisms to improve our screening processes and to support legitimate travel and immigration to the United States while protecting U.S. citizens,” said the official, who spoke on the condition of anonymity, saying she cannot be named and asking that her comments be attributed to a “Department of State official.”

Funke, a renowned academic who studies far-right movements, last year wrote an article for the website of the American Institute for Contemporary German Studies at Johns Hopkins University linking violence in Charlottesville, where a white nationalist rally turned deadly in 2017, to the election of President Trump.

He has also visited Iran, a country whose citizens have largely been barred from entering the United States since Trump took office. The professor last visited Iran in 2014 for an academic conference and to visit the family of his wife, who emigrated from Iran to Germany in the 1980s and is now a German citizen.

In an interview Thursday, Funke said he was confounded because he had received the same visa — one designated for students and professors on academic exchanges — exactly a year earlier when he was a fellow at the American Institute for Contemporary German Studies.

“I was appalled to a degree, irritated,” Funke said. “It’s not very fair.”

Trump has sought to restrict travel from Iran, citing the potential that visitors pose a “national security threat.” Within days of taking office, he announced a travel ban that barred visitors from five predominantly Muslim countries, including Iran, and has granted exceptions to a fraction of those who have applied for visas. The sweeping ban has kept Iranian grandmothers from visiting family in the United States and barred a Libyan toddler from being reunited with her American mother.

The travel ban has also posed challenges for students and scholars seeking to study or conduct research in the United States. Recently, Iranian students have had their visas abruptly revoked when they attempted to return to school.

Protests erupted last month at Logan International Airport in Boston when Shahab Dehghani, an Iranian student who had arrived to start his spring semester at Northeastern University, had his visa revoked. Boston immigration attorneys told Commonwealth Magazine that he was at least the 10th student to be deported from Logan.

Jeffrey Grossman, the chair of Germanic languages and literatures at U-Va. who is co-teaching the classes with Funke, said students are deeply interested in both classes’ topics — far-right populism and political memory — in part because of Charlottesville’s unfortunate connection with both topics.

In August 2017, it was the site of a violent protest by white nationalists who had come to oppose the removal of a statue of Confederate Gen. Robert E. Lee from a downtown park, filling the air of the quaint college town with racist and anti-Semitic chants. One protester, a man from Ohio with Nazi leanings, drove his car into a group of counterprotesters, injuring dozens and killing one, 32-year-old Heather Heyer.

Trump, later discussing the rallygoers and the counterprotesters, said there were “good people on both sides.” It became a flash point for critics who charge that Trump is emboldening white supremacists.

Grossman said the classes were partially inspired by a desire to help students process what had happened within a historical and global context, particularly as ­far-right movements rise in Germany, Austria, Poland, Hungary and the United States.

This week, one student in the class on far-right populism delivered an emotional presentation that touched on his experience as a counterprotester at the 2017 protest. Another student, in the class on political memory and the Holocaust, has had a reckoning with her education in rural Virginia, where she incorrectly learned that the Civil War was about states’ rights — not slavery.

After the events in 2017, Grossman said, “We certainly felt a strong consciousness . . . to take steps to work for a better world so things like that don’t happen again.”

The delay in Funke’s visa provided another teaching moment, Grossman said. When a student inquired about Funke’s visa situation last week, an exasperated Grossman replied: “You’re seeing right-wing populism in action.”