ATHENS (Reuters) - Riot police fired teargas on Tuesday at protesters demonstrating just a few kilometers (miles) from the presidential mansion where Greek leaders were hosting a state banquet for visiting U.S. President Barack Obama.

About 7,000 people, among them many hooded protesters and members of the Communist-affiliated group PAME, marched through the streets of central Athens holding banners reading "Unwanted!"

The police clashed with the protesters after they tried to break through cordon lines to reach the parliament building and the U.S. embassy. Some demonstrators threw two petrol bombs at police before dispersing into nearby streets close to Athens's main Syntagma Square.

In a separate protest in the northern city of Thessaloniki, protesters burned a U.S. flag.

The visit comes only two days before the anniversary of a bloody 1973 student revolt that helped topple the 1967-1974 military junta which was backed by the U.S. government.

Obama, who will be succeeded in January by Donald Trump, arrived in Greece on Tuesday on his last foreign tour as president of the United States.

(Reporting by Renee Maltezou; Editing by Gareth Jones)