Joe Alwyn is credited with co-writing and co-producing several songs on girlfriend Taylor Swift's acclaimed sister albums "Folklore" and "Evermore," but the British actor says his input was purely happenstance.

"It was really the most accidental thing to happen in lockdown," Alwyn told British GQ. "It wasn't like, 'It's three o'clock, it's time to write a song!' It was just messing around on a piano and singing badly and being overheard and then thinking, you know, what if we tried to get to the end of it together?"

In addition to co-writing the "Folklore" songs "Exile" and "Betty" under the pseudonym William Bowery, Alwyn also co-produced those two tracks, plus "My Tears Ricochet," "August," "This Is Me Trying" and "Illicit Affairs." On "Evermore," he co-wrote "Champagne Problems," "Coney Island" and the title track.

The "Billy Lynn's Long Halftime Walk" actor said he chose to be credited under a different name because he didn't want to take attention away from Swift's work, explaining, "The idea was that people would just listen to the music rather than focus on the fact that we wrote it together."

PHOTO: Taylor Swift and Joe Alwyn arrive at Zuma on Oct. 6, 2019 in New York City.
Jackson Lee/GC Images via Getty Images, FILE
Taylor Swift and Joe Alwyn arrive at Zuma on Oct. 6, 2019 in New York City.

While Alwyn said there are no plans for him to co-writing more songs with his girlfriend of about six years, he admitted he did enjoy the experience, telling the magazine, "It was fun to do it together, and I was proud of it. It was nice getting such a positive reception."

In addition to a positive reception, Alwyn got a Grammy for his trouble. When "Folklore" won Album of the Year, he received his own trophy along with the other producers, including Swift, who contributed to the project.

The "Conversations With Friends" star also opened up to Extra about keeping his relationship with Swift out of the headlines and spotlight.

"I think people having a private life is important to understand people's interest in what's going on behind closed doors," he said. "I think it's nice to draw a line as well and keep what's important and close to you private."

"Conversations With Friends" arrives on Hulu on May 15.