Google parent Alphabet said on Tuesday that its AI investments were "paying off," as it reported a 35% surge in its cloud business and U.S. election-related spending lifted YouTube ad sales in the third quarter.

Alphabet shares rose nearly 6% in after-market trading on Tuesday. Shares of Amazon and Microsoft, the top cloud companies, were up about 1% after hours.

Alphabet topped third-quarter revenue and earnings expectations. Its mainstay Search business jumped 12% and as did revenue from YouTube ads.