The year was 2017, and Chipotle Mexican Grill was in dire straits.

A series of food-borne illness outbreaks, including E. coli and norovirus, had scared away customers. A culture of fear permeated the company. On top of this, Chipotle was forced to announce a data breach that potentially exposed hundreds of thousands of customers' credit card information.

In the meantime, Taco Bell, Chipotle's chief competitor, was thriving--partially due to the effective leadership of its CEO at the time, Brian Niccol. 

Many saw Niccol as the driving force behind Taco Bell, a company that had suffered its own PR nightmares through the years. Additionally, Niccol, who served as Taco Bell's marketing and innovation chief (and then president) before taking over as CEO, oversaw the launch of a popular mobile app and several new items to the core menu. These moves helped establish the company's solid relationship with younger customers. 

Chipotle wanted to turn things around too. So, about a year ago, Chipotle did the smartest thing possible:

They poached Taco Bell's CEO--and made him their own.

Fast forward to today, and Chipotle is thriving: The company just released its latest results, which beat analyst's expectations. Store sales are on the rise, the stock price has surged, and the future looks bright.

How did Niccol do it?

A look back at the new CEO's actions over the past year reveals a combination of corporate strategy and emotional intelligence.

Here are a few things that stick out:

1. Modernization.

In the short time since taking over Chipotle's top spot, Niccol has focused on modernizing the brand, including:

  • Upgrading Chipotle's app and loyalty program
  • Adding delivery services through its mobile app and website (via DoorDash)
  • Slowly testing and introducing new menu items
  • Streamlining operations to make mobile pickup orders more efficient

The new measures seem to be working. In the fourth quarter of 2018, digital sales grew by 66 percent, accounting for 12.9 percent of all sales. And a new, simple pickup system for mobile orders--which basically consists of a collection of shelves with a sign--has helped further boost sales.

"Over time, we believe this can be a multibillion-dollar opportunity," says Niccol.

2. Talent.

While Chipotle had once succeeded at building a successful brand, the company had lost its way. 

So when Niccol took over, he brought in new blood, which included installing former Taco Bell executives to run various teams at Chipotle. The new hires brought along fresh enthusiasm.

Additionally, Chipotle decided to move its headquarters from Denver to Newport Beach, California--right down the road from, you guessed it:

Taco Bell's corporate headquarters.

"Corporations are only as good as the people you have running them," Niccol told CNBC. "I firmly believe that with the talent we have in place, we are making smarter decisions."

3. Emotionally intelligent marketing.

For years, Chipotle was known for a low-key marketing effort, relying mostly on old-school methods like billboards and word-of-mouth advertising. The strategy evolved over the years, but marketing continued to seem like an afterthought.

That strategy changed drastically with Niccol, who ushered in former Taco Bell exec Chris Brandt as the new CMO. Both Niccol and Brandt speak about developing a "lifestyle brand," and showing customers that Chipotle can have fun.

Sound familiar? (Think hard about Taco Bell's most famous ads through the years, which have included talking chihuahuas and...tacos.) 

Additionally, Chipotle has used special promotions to win the hearts of customers. Last year on National Avocado Day, the company gave away free guacamole with a digital purchase. The promotion reportedly sent digital sales skyrocketing nearly 60 percent.

All of this is evidence of marketing that makes an effort to make emotional connections.

Modernization. Talent. Emotionally intelligent marketing.

These are just a few strategies Niccol has brought along in an attempt to transfer the success he enjoyed at Taco Bell to Chipotle.

Now the question: Is there room for both companies to succeed as they compete for market share? Time will tell.

But if Taco Bell starts to suffer, execs may have to figure out a way to lure their old boss back to his roots.