Janelle Monae battled severe anxiety attacks while recording her hit album Dirty Computer due to concerns over the political climate in the U.S.

The singer admits working on the 2018 album was difficult because she feared President Donald Trump would take issue with some of her lyrics.

'It was one of the first times I felt very afraid," she tells National Public Radio. "There was a lot going on in the country during that time and I didn't know if this was going to embolden them (politicians), at the time, to do something to people like me, who were speaking out against racism and sexism and xenophobia and Islamophobia, and everything that they represent. I just didn't know."

But while the 34 year old was concerned about the album's release, she refused to edit her freedom of speech.

'I started to just have anxiety attacks about it, and I'm thankful I didn't let that stop me, because I think what that album represented, especially one of my songs, 'Americans', ... deals with that," she adds. "It deals with how I'm not going to back down and we're not going to back down and become silent and quiet and watch this president tear this country apart and tear down the people that helped build this country."

The recording process also allowed her to team up with Prince before his death in 2016, and that gave her another reason to press on with the release.

"He was working with me on Dirty Computer before he transitioned on," she explains. "Prince was helping, sending me song inspirations and we were going back and forth. And so when he transitioned on, I felt that I had to continue to finish that album. And I was always asking myself, 'What would Prince do?' in these moments whenever I couldn't figure out a lyric or music or instrumentation or melody."