The intruder, who is aged 18 and has a history of psychological problems, was arrested late on Saturday at the Paris monument after bursting past security and shouting “Allahu Akbar” (“God is Greatest”).
Armed soldiers who are permanently stationed at the Eiffel Tower surrounded him and ordered him to drop his weapon, which he did without attacking anyone, one security source said, asking not to be named.
In custody, he said he wanted to commit “an attack against a soldier and had been in contact with a member of the jihadist group Islamic State who encouraged him to take action,” a separate source told AFP.
France has been in a state of emergency since November 2015 and has seen a string of attacks on security forces who have been regularly targeted, particularly those guarding key tourist sites.
In February, a man armed with a machete attacked four soldiers on patrol at Paris's Louvre Museum, while in April another extremist shot and killed a policeman on the Champs Elysees.
In June, a 40-year-old Algeria doctorate student who had pledged allegiance to the Islamic State group attacked a policeman with a hammer outside Notre Dame cathedral.
Police had initially treated Saturday's Eiffel Tower incident as a criminal case, but anti-terror prosecutors have since taken over the investigation.
After the arrest, police checked the Eiffel Tower site and called for it to be evacuated at around 00:30, 15 minutes before it normally closes, a statement from the company that runs the monument said.
The intruder was wearing a Paris Saint-Germain football shirt. At the time of the incident the tower was lit up with the colours of the team to welcome the club's new world-record signing, Brazilian star Neymar.
The legal source said the man with the knife, a Frenchman born in the West African state of Mauritania, was a patient in a psychiatric hospital who had been let out for the weekend.
He was found guilty of inciting terrorism and making death threats in December 2016 and received a suspended sentence.
The tower reopened on Sunday morning as usual at 09:00 am (0700 GMT) Paris mayor Anne Hidalgo praised the “professionalism and reactions” of security forces at the site.