When Guru Nanak Ji visited Ayodhya in early 16th century for darshan of Bhagwan Ram

As the world observes 550th birth anniversary of Guru Nanak, it is timely to recall his visit to Ayodhya and having darshan of Bhagwan Ram before the temple was destroyed by Babur. Guru Nanak's visit to Ayodhya and his observations on the city have been recorded in 'Janam Sakhis', especially Bhai Man Singh's Pothi Janam Sakhi.
Incidentally, the visit of Guru Nanak to Ayodhya prior to the destruction of the Ram Temple by Babur was referred as a proof of the temple's existence by one of the Judges in the Ran Janmabhumi verdict delivered on Nov 9th by the Supreme Court.
Guru Nanak Ji's visit to Ayodhya
It was during 1510 when Guru Nanak Ji was traveling the country when he visited Ayodhya. According to Bhai Man Singh's Pothi Janam Sakhi written in the late 18th century, Guru Nanak Ji said to his disciple Mardana when they were in Ayodhya. "Mardania! eh Ajudhia nagari Sri Ramachandraji Ji ki hai. So, chal, iska darsan kari", which translates to: 'Mardana! this Ayodhya city belongs to Sri Ramachandra Ji. So let us go for his darshan." Bhai Man Singh's Pothi Janam Sakhi is said to have been composed in 1787.
Bhai Man Singh's Pothi Janam Sakhi indicates that Guru Nanak visited Ayodhya shortly before the destruction of the Rama temple by Babar in 1528. Man Singh's Janam Sakhi written two hundred years later drew from existing historical accounts and traditions relating to Nanak Ji's visit to Ayodhya. Yet another work by Baba Sukhbasi Ram gives a similar account which again suggests that Nanak Ji visited Ayodhya before the temple was destroyed by his contemporary, the Mughal invader Babar.
Guru Nanak had condemned Babar's atrocities and said, "These kings are nothing but butchers" referring to the destruction of Ram Temple at Ayodhya.
Supreme Court quotes Guru Nanak Ji's visit to Ayodhya 

The visit of Sikhism founder Guru Nanak Dev, whose 550th birth anniversary celebrations are underway, to Ayodhya for darshan of Janmabhoomi of Lord Ram in 1510-11 AD supports the faith and belief of Hindus that the site was the birthplace of the deity, the Supreme Court said in Ayodhya Verdict.
The judgment says that Rajinder Singh, Sikh Scholar, appearing as a witness for the Hindu side had refered to several books about Sikh Cult (sic) and history. He also stated in his examination-in-chief that Guru Nanak Dev Ji had sought darshan of Shri Ram Janma Bhumi Temple at Ayodhya. The text of the judgement is presented verbatim below:
"The period during which Guru Nanak Devji went to Ayodhya and had darshan stated to be is 1510-1511 A.D. In paragraph 11 of examination-in-chief, he states:- “11. Guru Nanak Devji, after getting the appearance of God on the auspicious day, Bhadrapad Poornima, 1564-Vikrami = 1507 c.e. prepared him for going on pilgrimage. Then he went to Ayodhya via Delhi, Haridwar, Sultanpur etc. Almost 3-4 years have passed in this journey. Similarly Guru Nanak Dev went on pilgrimage to see Shri Ram Janam Bhoomi Mandir in 1567-1568 Vikrami = 1510-11 Christian era. It is mentioned here that invader Babar has not invaded India by that time.”
The judgment further notes that Rajinder Singh, along with his statement, has annexed various Janma Sakhies, which records visit of Guru Nanak Devji at Ayodhya and Darshan of Ram Janma Bhumi. 'Janam Sakhis' are writings which profess to be biographies of Guru Nanak Dev.
The judgement says, "Janma Sakhies, which have been brought on the record contains a description of visit of Guru Nanak Devji to Ayodhya, where he had darshan of birthplace of Lord Ram. The visit of Guru Nanak Devji in 1510-11 A.D. and to have darshan of Janma Bhumi of Lord Ram do support the faith and beliefs of the Hindus."
Bhagwan Ram in Sikh texts

Apart from Guru Nanak Dev, records show that other Sikh Guru's like Guru Tegh Bahadur and Guru Gobind Singh had also visited Ayodhya at different times. Shri Guru Govind Singh Dev, in his autobiography 'Bachitra Natak', has written that he is a descendant of Shri Rama’s younger son Lava, and that Guru Nanak Dev was a descendant of Shri Rama’s elder son Kusha.
Further, Sikh scholar Rajendra Singh's book 'Sikh Itihas Mein Shri Ram Janmabhoomi' provides various accounts of veneration of Bhagwan Ram in Guru Granth Sahib and by many Sikh Gurus. In his work, he explains that the Rama of the Shri Adi Granth is the same Rama of Valmiki's Ramayana and son of Dasharatha. The book takes the reader through the medieval Indian history beginning with the life of Guru Nanak Dev ji and culminating in the liberation of the Ram Janmabhoomi Mandir by Guru Govind Singh ji. The lives of the first, ninth and tenth Gurus are discussed in detail. The misrule of Babur and that of Aurangzeb are also closely examined. He points out that Bhagwan Ram’s name is mentioned more than 2500 times in Shri Guru Granth Sahib.
There are three Sikh shrines near Brahm Kund on the bank of Saryu river in Ayodhya. All the three Sikh shrines were taken care of by Brahmin priests but were later handed over to Shri Gulab Singh in the middle of the 19th century, as per written accounts.