After Shaun Livingston formed a strong partnership with Deron Williams this past season in Brooklyn, he now hopes to do the same with Stephen Curry in Oakland.

Livingston, one of the feel-good stories of the league this past season and a key part of the Nets’ midseason turnaround, agreed to a three-year deal worth $16 million with the Warriors on Tuesday, the opening day of free agency in the NBA.

“The team, the offer, I think with what they could offer … the money was there initially. It was just a matter of ironing out the years, the security and then from there just pitting each team up against each other with the personnel and kind of how I fit into that system,” Livingston told The Post on Tuesday evening after agreeing to the deal, which includes a partial guarantee of the third year but can’t be signed until July 10, when the league’s annual moratorium comes to an end.

“And with what Golden State has, I thought that it would be kind of a similar situation to Brooklyn last year. I think it’s a nice niche for me. I can carve out a good role there, and I think, too, I was a priority, so they’re looking for me to come in and play a significant role.”

The Nets wanted Livingston back, and he appreciated the opportunity they gave him to reestablish himself as a valuable commodity in the NBA. But general manager Billy King admitted Tuesday morning it would be difficult to re-sign Livingston, given the Nets couldn’t sign him for more than the mini mid-level exception for three years and roughly $10 million.

“It’s tough,” Livingston said of having to leave the Nets. “It’s bittersweet in a sense because, no matter how well you play it’s like, ‘Well, I’m still moving on,’ and going from city to city.

“Again, for the organization to give me that shot, I wouldn’t be in the position I’m at today, just with Brooklyn and their pieces, and obviously [former coach] Jason Kidd was a part of that last year. It’s definitely a credit due to them. But, again, if I don’t perform, and I don’t put up the season I had, we’re not having this conversation. If [I hadn’t performed] and they had waived me and I don’t come back, nobody really cares. It goes both ways, man. It’s a business.”

With Livingston now out of the picture, the Nets will have to go in another direction with their mini mid-level exception. One possibility, according to league sources, is Bojan Bogdanovic, the Nets’ 2011 second-round pick who has spent the past three years playing for Turkish power Fenerbahce Ulker.

Bogdanovic, 25, saw his contract with Fenerbahce expire after this season, and he currently is a free agent.

Livingston averaged 8.3 points, 3.2 rebounds and 3.2 assists for the Nets, stepping into the starting lineup for good on Jan. 2 and providing the Nets with a second adept ball handler in the backcourt next to Williams and, at 6-foot-7, a long and athletic defender to throw at the opposition’s top perimeter player.

He now will be able to fill a similar role with the Warriors, where he is a perfect compliment to Curry and could help the Warriors cover up for the loss of Klay Thompson, if he’s included in a trade package for Timberwolves power forward Kevin Love as has been rumored.

The fourth-overall pick in the 2004 draft by the Clippers, Livingston’s season with the Nets was the best of his career. He suffered a devastating knee injury with the Clippers in 2007 and has spent the past several years fighting to reclaim his place in the league bouncing among seven different teams and spending some time in the D-League.

Now Livingston is reaping the rewards of his hard work, giving himself the kind of long-term security he has worked to achieve.

“It’s huge,” he said. “Just for the fact that all of the work that I put in for all those years, and bouncing back and working my way up from the D-League. You kind of just see where I was at the value I had throughout the NBA. … It was low, and I was on my way out, and then now to be in this position where you’re kind of coveted.

“I’m not saying I’m a superstar free agent, but when you’re coveted it puts things into perspective. I don’t forget where I’ve come from, and that’s the appreciation that I have for this whole process.”