In the capital, he fell in love with an eleven-year-old girl, Rosario Emelina Murillo, whom he wanted to marry. He traveled to El Salvador in August 1882, at the petition of his friends who wanted to delay his marriage plans. In El Salvador, Darío was introduced to the president of the republic, Rafael Zaldivar, by Joaquín Mendez, a poet who took him under his wing. There, he met the Salvadoran poet Francisco Gavidia, a connoisseur of French poetry. Under the auspices of Gavidia, Darío attempted, for the first time, to adapt the French Alexandrine metric into Castilian verse. Although he enjoyed much fame and an intense social life in El Salvador, participating in celebrations such as the centenary of the birth of Simón Bolívar, things began to get worse. He encountered economic hardships and contracted smallpox. In October 1883, still convalescent, he returned to his native homeland. After his return, he briefly resided in León and then in Granada but he finally moved again to Managua where he became an employee of the Biblioteca Nacional de Nicaragua (the National Library of Nicaragua) and he resumed his romance with Rosario Murillo. In May 1884 he was condemned for vagrancy and sentenced to eight days of public work, although he managed to evade the fulfillment of the sentence. During that time he continued experimenting with new poetic forms, and he even had a book ready for printing, which was going to be titled "Epístolas y poemas". This second book also did not get published, it would have to wait until 1888 when it was finally published as "Primeras notas". He tested his luck with theatre, and he released his first play, titled "Cada oveja...", which had some success, but no copy remains. He found life in Managua unsatisfactory, and prompted by the advice of some friends, opted to embark for Chile on June 5, 1886. After making a name for himself with love poems and stories, Darío left Nicaragua for Chile in 1886, and disembarked in Valparaiso on June 23, 1886. In Chile he stayed with Eduardo Poirier and a poet by the name of Eduardo de la Barra, together they co-authored a sentimental novel titled "Emelina", with which they entered in a literary contest (although they did not win).