A couple of years ago, the respective fortunes of Apple’s and Microsoft’s tablets were clear.

Apple was king, thanks to the iPad. And Microsoft’s awkward, overpriced Surface was just the latest hardware dud for the Seattle company.

Now, the two companies are experiencing a surprising reversal of fortunes.

Through the first nine months of Apple’s last fiscal year 2016 (ending Sept.), the company sold 36.3 million iPads, down 19 percent from the same period a year ago. iPad revenue for those nine months fell 14 percent to $16.4 billion.

In the third quarter (ending June), unit sales of the iPad fell 9 percent to 9.95 million. Although, thanks to the introduction of the higher-priced iPad Pro, iPad revenue actually rose 7 percent to $4.9 billion.

By contrast, Microsoft reported yesterday that Surface revenue climbed 38 percent to $926 million during the most recent quarter (the company’s Q1 of its 2017 fiscal year). For its full 2016 fiscal year that ended in June, Surface revenue increased 13 percent to $4.2 billion. (Microsoft doesn’t break out unit sales of the Surface.)

Now, the first thing worth noting is that Apple’s iPad is still far outselling Microsoft’s Surface. Apple will report Q4 earnings next week, but it’s a safe bet that its iPad revenue for the full year will be about 5 times that of Microsoft’s Surface for the full year.

What makes this interesting, however, are those overall trends: Apple’s iPad revenue going down (except for last quarter), Surface going up.

What’s going to be critical to watch in Apple’s upcoming earnings report is what the company says about its iPad enterprise sales in the most recent quarter.

Apple has struck big partnerships with Cisco, IBMSAP, and consulting firm Deloitte. They are helping firms write enterprise apps geared toward the iPad, which Apple hopes will drive unit sales. By introducing the bigger iPad Pro late last year, with a stylus to match the Surface, the company is betting heavily that the enterprise market can stop the decline of iPad sales.

The increase in iPad revenue last quarter provided some reason for optimism for Apple, though there’s no definitive proof that its enterprise strategy is working yet. Hopefully, we’ll know more next week.

When it comes to the enterprise, however, Microsoft already has long-term relationships that stretch back decades. And after numerous updates to the Surface, it’s finally gaining some love from IT managers in those companies. In the earnings call yesterday, Microsoft CEO Satya Nadella said that orders of 500 or more Surface devices were up by 70 percent in the last quarter.

If that trend of enterprise sales is really accelerating for Microsoft, we could see the gap with the iPad close pretty rapidly. Apple, famously consumer-focused, primarily relies on consumers buying one gadget a time, but it’s hoping its new partners can help build those ties to the enterprise. Because if Microsoft is selling large numbers to a single enterprise customer, it could have an advantage over the long run.

Either way, it could well be that IT managers, rather than consumers, are going to decide the winner of this battle.