"It didn't go anywhere. I had nothing," he recalled in an interview.
Happily, a friend introduced him to playwright David Henry Hwang, and they agreed to collaborate on a piece about a historical figure they both admired: Federico Garcia Lorca, the leftist Spanish dramatist and poet who was killed by fascist forces at the start of the Spanish Civil War.
Of necessity, the collaboration proceeded fast and furiously. "I was so pressed for time that he started faxing me pages, one by one," Golijov said. "I didn't even know how the thing was going to end or anything." Hwang wrote the libretto in English and Golijov translated it into Spanish.
Somehow the result, "Ainadamar," premiered on schedule. It was restaged in revised form two years later at the Santa Fe Opera, and is now coming to the Metropolitan Opera in a production by Brazilian director and choreographer Deborah Colker that runs for nine performances beginning Oct. 15.
The title is an Arabic word that translates as "fountain of tears" and refers to a spring in the hills above the city of Granada — the site where Lorca was assassinated in 1936.
Hwang said he and Golijov were "moved by the fact that Lorca had to some extent predicted his own murder through his work." His early play, "Mariana Pineda" tells of a Spanish heroine of the 19th century liberal movement who was executed for refusing to betray her comrades.
Margarita Xirgu, who starred in that play, became Lorca's muse, and when she fled to Cuba she tried unsuccessfully to persuade him to join her.
Early on, Hwang decided to have Xirgu, rather than Lorca, be the main character in the opera.
"I liked the idea of creating Lorca through the memories of Margarita," Hwang said. "I feel in general that when you're dealing with an iconic figure, it's interesting to see them refracted through the perceptions of those who had some sort of intimate relationship with them."
An unexpected wrinkle arose when Golijov realized that Tanglewood had already assembled a cast for the opera he didn't write — and it was all women.
"And there was one who had this extraordinary dark voice," he said. "I got goosebumps. I told David, how about we make Lorca a woman."
So what many critics have seen as a nod to a time-honored operatic tradition of having a woman portray a young man in a "trousers role" actually came about as a matter of necessity.
At the Met, the role of Lorca will be sung by mezzo Daniela Mack. Soprano Angel Blue is Margarita (with Gabriella Reyes substituting on Oct. 30.) Soprano Elena Villalón portrays Margarita's protege Nuria, Flamenco singer Alfredo Tejada is the politician who arranged Lorca's execution, and the conductor is Miguel Harth-Bedoya. The 90-minute opera is performed without intermission.
When the production premiered in Glasgow, Scotland, in 2022, Rowena Smith in The Guardian described Golijov's score as "a collage of influences, shifting fluidly from Flamenco and electronic music to the classical language of 19th-century opera."
"In this production the musical language finds a mirror in Deborah Colker's striking staging," she added.
Colker, who had never directed an opera, said she approached the staging as a choreographer, with singers and chorus members joining in the continual flow of dance rhythms. She enlisted a Flamenco choreographer, Antonio Najarro, to assist her.
"I want constant movement," Colker said. "I want the audience not to recognize who is dancing, who is singing. Everybody is moving the sets, building the barricades, the tabletops where people dance in Spanish bars."
Golijov himself said he found Colker's work revelatory.
"I've seen dozens of productions and this is the one that actually made me discover things in the piece that I hadn't discovered," he said. "She got the tectonic movements, the very slow geological movements that are in the structure of the opera, so when she creates a climax, it's 10 more times explosive because she knows how to build it."
Yuval Sharon, artistic director of the Detroit Opera, said that when his company staged the production, "it set our audience on fire. They had never seen anything like it before."
For Golijov, having his opera performed at the Met is especially sweet given his troubled history with the company. He had been commissioned to compose a new piece for the 2018-19 season. But in 20016, the Met canceled the commission, citing the composer's lack of progress.
"I had a few years of bad depression," Golijov acknowledges. "I wrote much less, and I think they got scared that I would never finish the opera."
In recent years, he has again become productive, composing a song cycle, "Falling Out of Time," a violin concerto, and other pieces. He also wrote the score for Francis Ford's Coppola's new movie, "Megalopolis."
And he's beginning work on a new opera, inspired by what he calls a lifelong fascination with Laika, the Soviet dog who became the first living creature to orbit the Earth.
Does he hope it also might eventually see a production at the Met?
Golijov said that after the earlier disappointment, "I think they love me, but they don't trust me.
"It's OK," he added, "because if it's good enough, it will end up there."