Elvis Costello has canceled the rest of his European tour after tells fans that he had surgery to treat cancer.

The cancellation only affects six remaining dates in Croatia, Austria, Norway and Sweden, NBC News reported.

>> Read more trending news

Costello did not say what type of cancer he had, or where it was located, but said that his doctor contacted him six weeks ago.

"He had rarely, if ever, seen such a small but very aggressive cancerous malignancy that could be defeated by a single surgery," Costello said in a statement.

But the physical demand of touring and performing nightly has taken a toll on him as he recovered, so doctors have told him to rest, NBC News reported.

In the statement about the cancellations, Costello wrote:

The spirit has been more than willing but I have to now accept that it is going to take longer than I would have wished for me to recover my full strength. Therefore, I must reluctantly cancel all the remaining engagements of this tour.

Costello announced in the statement that he has a new album that will be released in October. He also offered this advice to his fans.

Take very good care of your loved ones but Gentlemen, do talk to your friends -- you'll find that you are not alone -- seek your doctor's advice if you are in doubt or when it is timely and act as swiftly as you may in these matters. It may save your live. Believe me, it is better than playing roulette.