Warranty Work

If I buy a new GMC Sierra 1500 from a dealer other than one of my local GMC dealers, can my local dealer refuse to perform warranty work on it? I may be able to get a better deal on the new truck at a dealer over 100 miles away, but it would be impractical to have to drive all that way to get work done.