Talk about the law of attraction!

Julia Michaelsand JP Saxe just teamed up for the first time to release the beautifully stripped piano ballad “If The World Was Ending” — which features melancholic melodies and lovesick lyrics — on Thursday.

The two musicians met in a serendipitous way. Michaels reveals that a friend recommended Saxe’s standout track “25 in Barcelona,” leading her to play the song on repeat “just over and over and over.”

Michaels, 25, went on to share a screenshot of herself listening to Saxe’s tracks on social media at the same time Saxe, 26, was on the road with some friends.

“Fifteen minutes before I got the notification that ‘Julie Michaels has tagged you in a post,’ I was listening to her music and talking with my friends about how Julia was one of my favorite artists and songwriters,” Saxe tells PEOPLE. “So when I saw she posted my song, I was like, ‘What is going on?’ I just thanked her, and then she said she wanted to write and I was like, ‘Stop it, you can’t say things like that to me!’”

And so “If The World Was Ending” was born.

Kimberly White/Getty; Noam Galai/Getty

SAN FRANCISCO, CA - SEPTEMBER 09: Julia Michaels performs at the 2017 GLAAD Gala at City View at Metreon on September 9, 2017 in San Francisco, California. (Photo by Kimberly White/Getty Images for GLAAD) NEW YORK, NEW YORK - FEBRUARY 27: JP Saxe performs at Baby’s All Right on February 27, 2019 in New York City. (Photo by Noam Galai/Getty Images)

“That session was one of the most magical in my life,” Saxe says of writing the track with Michaels. “We sat down at the piano, and that song just poured out of us. We wrote it and recorded it, essentially, the day we met.”

The track came about just days after several earthquakes hit Southern California in early July. “What A Time” singer Michaels says the track helped her put things into perspective.

Julia Michaels & JP Saxe.Sony Music

JP Saxe, Julia Michaels

RELATED ARTICLE:Pop Star Julia Michaels Admits She’s Done ‘S—ty Things’ to Boyfriends for Song Inspiration

“If s— were to hit the fan and things were to fall apart tomorrow, who would I would I want to be beside?” she says. “You start to think about the little things and why you wouldn’t be talking to somebody that you love. You never f—ing know what tomorrow’s gonna be, and it is so f—ing stupid when you don’t talk to somebody that you love.”

But Saxe, with a laugh, was quick to clarify: “I don’t think we’re suggesting anybody text their exes. But maybe we’re suggesting that sometimes the reasons that keep us from the people we really love, put into context, just start feeling small.”

Saxe adds: “In the grand scheme of things, choosing your love for somebody over the petty reasons you don’t talk to someone is a meaningful consideration.”

RELATED ARTICLE:Julia Michaels and Lauv Split as She Shares New Year’s Resolution: ‘No More Dating Narcissists’

While their song explores what could happen in a world-ending event, both Michaels and Saxe are sure they wouldn’t survive if an apocalypse were to actually happen.

“I’m totally f—ed,” Saxe says, as the t. “Like if Postmates isn’t working, I don’t know how I’d survive. I don’t think in the post-apocalyptic skillset ‘sensitive songwriting’ is one of them.”

“My fight or flight instinct would not kick in,” Michaels adds, laughing.

“If The World Was Ending” is out now.

source: people.com