Stocks rose on Thursday on the back of strong gains in Disney and energy shares, building on this month's sharp rally.

The Dow Jones Industrial Average climbed 101.94 points to 26,106.77 as Disney shares outperformed. The S&P 500 gained 0.4% to close at 2,891.64, led by the energy sector. The Nasdaq Composite advanced 0.6% to 7,837.13.

Disney shares contributed to the gains, rising 4.4% after an analyst at Morgan Stanley raised his price target on the stock to $160 per share from $135. The analyst cited the company's new streaming service, noting it could give its global subscriber numbers a boost.

The Energy Select Sector SPDR Fund (XLE) jumped 1.2% as oil prices surged. Hess and Phillips 66 were among the best performers within the fund, rising more than 2% each.

The major indexes posted small losses in each of the previous two sessions as a rally to start off June took a pause. The major indexes were all up more than 4% for the month, however, after notching sharp losses in May.