Image copyright Warner Bros Image caption The artwork for Sign O' The Times introduced Prince's new peach and black colour scheme

Thirty years ago, Prince was at a turning point in his career.

The film Purple Rain and its soundtrack had made him a star in 1984. But the following two years saw, by commercial expectations, three flops: The albums Around The World In A Day and Parade, as well as the ill-conceived, self-directed movie bomb Under The Cherry Moon.

He decided to cut loose. He split from his band, The Revolution, and planned a triple album - Crystal Ball. But his label, Warner Bros, put their foot down and the project became the double disc Sign O' The Times, released on 31 March, 1987.

It would become one of the most acclaimed albums of the second half of the 20th century, and remains Prince's masterpiece - encompassing all of his musical personas: bedroom balladeer; penitent Christian; one-track-mind loverman; modern-day Basie-style bandleader; whimsical storyteller; meticulous orchestrator, guitar-wielding axeman and pop craftsman.

Prince, then 29 years old, created it in a period of feverish activity, making copious use of a new Linn drum machine, and a state-of-the-art Prophet-5 synthesiser, borrowed from his keyboard player Matt "Dr" Fink.

"Just to be clear, he really did a lot of stuff on that album on his own," recalls Fink.

"[Two] years later, he did Batman with no help in the studio, as far as I know."

Image copyright Warner Bros Image caption The star released a concert film of the album in 1988, which remains the best document of his powerful live shows

Even engineer Susan Rogers, his closest collaborator at the time, was banished to another room when Prince recorded vocals in the basement of his house.

"He may have been feeling a bit constricted and hemmed in by the familial," reflects Jill Jones, who sang with Prince from 1982 to 1990.

The title track, as well as Housequake, The Ballad of Dorothy Parker, It, Hot Thing, Forever In My Life, U Got The Look, The Cross and Adore "all emanated from him", Fink adds.

Others were reworked from sessions for a clutch of abandoned albums - Dream Factory, planned as the fourth album by Prince and the Revolution; and Camille, a disc of songs recorded by Prince in the sped-up voice of an androgynous alter-ego.

For good measure, while making Sign O' The Times, Prince also wrote and recorded for other people, including The Bangles, George Clinton, Taja Sevelle, Sheila E, Sheena Easton and Jill Jones.

This time-frame of his career remains the most exciting to students of The Vault, the collection of hundreds of unreleased songs housed at Paisley Park and the subject of much debate since his untimely death last April.

Brent Fischer, who alongside his late father Dr Clare Fischer wrote orchestral accompaniments for Prince's albums from 1985 to 2010, estimates "about 70 per cent of the songs we worked on with Prince remain unreleased".

Eric Leeds, his saxophonist from 1984 to 2003, reckons the figure is "over 90 per cent... And those were just the songs with horns".

"It is as creative a period," argues Hot Chip's Alexis Taylor, "as The Beatles from Rubber Soul to The White Album; or Stevie Wonder from Music of My Mind to Songs in the Key of Life".

Taylor ranks Sign O' The Times in his "top four favourite" albums, alongside The Beach Boys' Pet Sounds, The Beatles' White Album and Sly & The Family Stone's There's a Riot Going On.

"But I'm not afraid to group it as the best," he adds.

"What I like about it is it's a personal-sounding record, quite a dark record. It doesn't have his biggest hits on it and that might not reach out to quite so many people."

Image copyright Warner Bros Image caption Prince spent three days - an uncharacteristically long time - perfecting the Sheena Easton duet U Got The Look

The title and opening track was not for faint-hearted radio pluggers. It addressed Aids ("a big disease with a little name"), social inequality, drugs, gun crime and mothers struggling to feed their children. The "O" of the title was rendered as a peace sign.

Although Fink recalls that "Prince didn't talk politics very much", Van Jones, a former special advisor to President Obama and Prince's friend from 2009, reckons otherwise.

"He was incredibly socially aware. You can put on Marvin Gaye's What's Going On and feel like you're living through the late '60s and '70s. Put on Sign O' The Times and you can get a sense of how the '80s and '90s were playing out. It still has that timeless quality."

'He needed a hit'

Sign O' The Times and U Got the Look, recorded with Sheena Easton, laid the commercial groundwork for fans to accept what was, in part, an experimental record.

According to notes Prince wrote for his 1993 Hits album, the latter track was deliberately written in the style of Robert Palmer's Addicted To Love - as a challenge to a friend who would only dance to his songs when they became popular.

Although he laboured for hours over the tempo and structure of the song, "the friend didn't like the song until it was in the Top 10".

"This relationship in itself reveals a touch of his business acumen," says Jill Jones, hinting at Prince's pragmatism, "because at that time he managed to parlay himself back into the pop sphere. He also needed a hit record."

Elsewhere, Prince wasn't afraid to use bandmates or even strangers for inspiration.

It's Going To Be a Beautiful Night, seen as an affectionate tribute to The Revolution, was "a live / studio jam" according to one of its co-writers, Eric Leeds.

"It was rather spontaneously written at the soundcheck before a gig in Paris. We recorded the song live during the concert that evening. Weeks later we added additional parts in the studio."

Image copyright Warner Bros Image caption Prince's dancer and foil Cat Glover appeared on the cover of the single, but many people thought it was the star himself, after shaving his legs

One of the album's more enigmatic tracks is The Ballad Of Dorothy Parker, a psychedelic funk track about a waitress who mocks Prince when he orders a fruit cocktail ("Sounds like a real man to me").

Although it borrows the name of the wisecracking journalist, Prince had no idea who she was; telling Tionne "T-Boz" Watkins of TLC (who would later cover the album's If I Was Your Girlfriend) it was inspired by a real-life encounter.

"He told me it was about this waitress he met," she says. "He had a crush on her and they were flirting but [Prince] told her he had a girlfriend.

"That's why he said in the song he wanted to have a bath with her - but keep his pants on."

That girlfriend (or even fiancee) for much of recording was Susannah Melvoin, who inspired and took a writing credit on the playful playground song Starfish and Coffee.

According to Matt Fink, it originally had a much different title.

"It was basically a story about when she was a schoolgirl and elementary school, she and Wendy (Melvoin, Prince's ex-guitarist and Susannah's sister) had a girl in their class who was mentally challenged and she used to talk about Starfish and Pee-pee.

"She told Prince the story. He was fascinated and felt for her disability and they worked on a song which became Starfish and Coffee."

Image copyright Warner Bros Image caption I Could Never Take The Place Of Your Man features one of Prince's most incendiary guitar solos

The prodigious inventiveness of Sign O' The Times won Prince five star reviews from Q Magazine and Rolling Stone, which named it one of the top 500 albums of all time. But to this day, the album provokes debate.

Jones and Leeds both question Prince's former head of security Gilbert Davison, who claimed in GQ that Prince wrote the first of the two discs "in a three-and-a-half-hour plane ride."

"I recognise some of the songs on this album as having been written other times" maintains Jill Jones. "Like Strange Relationship, The Cross and others. (A studio version of I Could Never Take The Place of Your Man originates from 1982). Not so sure it all happened in one go."

T-Boz hails it as her favourite record. "When I first heard If I was Your Girlfriend, I almost lost it. I would play it eight to 10 times a day. My mom was ready to kill me. Or Prince."

Asked about U2 beating Prince in the best album category at 1988's Grammys, she snarls: "No disrespect to U2, but you don't wanna get me started on that…"

Jones is more relaxed, calling it "no skin off Prince's nose".

Sign O' The Times remains Prince's "high water mark" among critics and musical commentators, according to both Fischer and Leeds.

Leeds claims: "It displays perhaps more than any other of his albums the range of his musicality. If someone just getting into his music was to ask me for the best place to start, I would direct them to Sign O' The Times."

The Roots' bandleader Questlove, disagrees: "I never tell Prince newbies to start their listening with it," he wrote on Instagram last year.

"I tell 'em… 'Save it for last'. Most come back to let me know I was correct. Man, that's cool."

Image copyright Getty Images Image caption The star's image became more demure in keeping with the album's socially-aware themes

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.