Mulayam's comments came during last day of the Budget Session of the Parliament, and comes as a massive blow to the Opposition.
PM Modi, for his part, thanked Mulayam.
Here are the details.
Mulayam Singh Yadav backs Modi's return as PM
Standing beside Sonia Gandhi, Mulayam voiced support for PM Modi
In his departure note during the last day of the Budget Session, Mulayam, speaking at the Lok Sabha, backed Modi for another term as PM, despite having criticized him earlier.
Standing beside Sonia Gandhi, Mulayam voiced his support, while PM Modi folded his hands in gratitude and smiled at the political veteran's words.
PM Modi has done good work: Mulayam
"I want him (Narendra Modi) to become Prime Minister once again. I congratulate him for trying to taking everyone together. He has done good work and nobody can raise a finger against him," said Yadav in the Lok Sabha.
Love Politics news?
Stay updated with the latest happenings.
What PM Modi and Rahul Gandhi had to say
Responding to Mulayam's comment, PM Modi thanked the SP founder in the Lok Sabha, saying, "There is much to do. And Mulayam Singh ji has given his blessings. I am very grateful to him."
Meanwhile, Congress president Rahul Gandhi responded by saying that he did not agree with Mulayam. However, he added, "Mulayam Singh Yadav ji has a role in politics and I respect his opinion."
Mulayam's comments come despite him campaigning with the Opposition
Up until his comment in the Lok Sabha, Mulayam had been sharing the stage with his son Akhilesh Yadav and other Opposition leaders like Chandrababu Naidu in the run up to the Lok Sabha elections, which are two months away.
However, despite this, Mulayam had not launched any direct attack on the BJP or PM Modi in the last few months.
Meanwhile, Akhilesh Yadav is taking on the BJP
Mulayam's comments come at a time when his son and current SP chief Akhilesh has been attending mega rallies organized by Opposition parties, including the one organized in Kolkata by the Mamata Banerjee-led Trinamool Congress.
Akhilesh has also gone into confrontations with the Yogi Adityanath-led Uttar Pradesh government, and a war of words had erupted yesterday after he was detained at the Lucknow airport.
All is not well between father and son
Mulayam is also believed to be close to his brother, Shivpal Yadav, who broke away from the SP to form his own party, Samajwadi Secular Morcha, last year.
Shivpal has also condemned the SP-BSP alliance.