Data scientists can frequently run up against a wall from their legal department when they try to innovate based on sensitive customer data. It makes sense — after all, data science teams and legal teams are natural antagonists. Data scientists take risks and innovate with big data. Lawyers avoid risks at all cost and act as the letter of the law.

But when we are forced to collaborate with people with radically different mindsets, there is the potential to grow – and, in the best of scenarios, create dynamic teams that drive results neither could have created singlehandedly.

That’s what happened with our team at Intuit when we decided to put the dueling forces of our data science team and our legal team together into one group, hoping that the outcome would be a much smarter use of our big data. And we’ve seen some amazing results.

Our data engineering and analytics team now reports into the legal department. It was a shaky start, with both sides eyeing each other warily. On one hand, the data team was eager to push ahead and harness the power of data from our 50 million customers. On the other, the legal team was well aware that this was highly sensitive data and any mistake or misuse could do serious damage to both our customers and the company. The challenge for both sides was to come together to safeguard the data while untapping its potential and delivering tangible benefits to our customers. Both sides want to solve the most important customer problems with data.

Even though many on the outside thought we were crazy, the two teams grew together to become one – and along the way we learned a few key lessons that can be of help to other companies and organizations exploring how to bring together their own odd couples:

Shared Outcome:  Even though we started with different world views, everyone on the team was bound together by a shared vision of what success looked like. Because we were working with data, we also established a specific set of Data Stewardship Principles that guided our work. First and foremost amongst these principles was that it was the customers’ data not ours.

Shared Accountability: With a shared vision of success in place, it was equally important to make clear that we would win or fail together as a team. It didn’t matter if someone worked on the engineering team or the security team, we made sure that the entire team was held accountable for getting there. It was vital that no finger pointing would be tolerated. We made clear that everyone had a role to play and that everyone was accountable for the team’s ultimate success. This shared responsibility helped break down barriers and transform conflict into teamwork.

Healthy Tension Builds Trust: As with any healthy marriage, sometimes it’s important to let it all hang out and clear the air. We were no different. We did not always agree – yet we worked hard to build enough trust so that all points of view could be heard and we could work towards our common goals. The only thing worse than ignoring someone is blindly doing everything they say. Either extreme will stifle creativity.

A Learning Curve: Ultimately, both our data team and our legal team learned from each other. They took practices and insights from the other to improve their own work. Today, our legal team has adopted some of the rapid experimentation innovation techniques used by the data team – and our data scientists have adopted a more rigorous partnership mindset. The key is promoting the mindset that you can always learn from other people, especially those who are most different from yourself – and that this learning never stops.

Building a successful odd couple team is not easy. But when you strike the right balance and empower odd-couple teams to collaborate, innovate, and work together, the possibilities are endless.

Bill Loconzolo is vice president of Intuit’s Data Engineering and Analytics big data team.

Laura Fennell is chief counsel and head of the Legal, Data, Compliance and Policy Division at Intuit.