Nike reported fourth-quarter earnings and sales Thursday that topped Wall Street's expectations, also confirming a major deal with a rival retailer that Nike has avoided working with in the past: Amazon.

This news sent shares of the world's largest footwear maker's stock more than 7 percent higher after hours.

On a call with analysts and investors, Nike's management team confirmed a new pilot with Amazon, where the retailer will directly sell a limited product assortment on Amazon's U.S. e-commerce platform. The offerings will include athletic footwear, apparel and accessories.

This is a move Nike has refused to make for decades, instead focusing efforts on its own digital marketplace. Though, reports began to surface earlier in the week that Nike was finally looking to reverse course.

Nike agreed to sell to Amazon in exchange for stricter policing of counterfeits and restrictions on unsanctioned sales of its products, a person familiar with the deal had told The Wall Street Journal.

Nike hopes to "improve the Nike consumer experience on Amazon," CEO Mark Parker said Thursday, adding that the company is still in the early stages of this partnership and will continue to evaluate sales results.

On the earnings front, Oregon-based Nike said its international geographies and direct-to-consumer businesses fueled sales growth in the latest quarter and for the full year. Nike was also able to keep its costs down.

Here's what the company reported vs. what Wall Street was expecting:

Earnings per share: 60 cents adjusted vs. a forecast of 50 cents, according to a Thomson Reuters consensus estimate.

Revenue: $8.68 billion vs. an $8.63 billion estimate, analysts said.

"[Nike] continues to create both near-term wins in today's dynamic environment and a lasting foundation for future growth," CEO Parker said in a statement.

"[W]e're putting even more firepower behind our greatest opportunities in Fiscal 2018," Parker added. "It will be a big year for ... innovation and we'll bring those stories to life through deeper consumer connections in our key cities around the world."

Nike's net income rose to $1 billion, or 60 cents per share, in the fiscal fourth quarter, from $846 million, or 49 cents a share, one year ago.

The increase in net income was driven by global revenue growth, lower selling and administrative expenses and a lower tax rate, Nike said. The company's selling, general and administrative expenses dropped 4 percent to $2.7 billion.

Total revenues climbed 5.3 percent to $8.68 billion. Notably, sales for the Nike brand came in at $8.1 billion, up 7 percent on a currency-neutral basis and driven by double-digit growth in Western Europe, Greater China and emerging markets. Nike's sales in Greater China, for example, rose 11 percent.

Revenues for Converse, another popular Nike nameplate, were $554 million, up 10 percent on a currency-neutral basis and boosted by a market transition in Italy, the retailer said.

Nike also saw strong growth in its Jordan brand, sportswear and running divisions.