I was driving 63-65 mph on the left-lane on the freeway. While driving, a car tailgated me, which was a law enforcement car. Because he was close, I accelerated to 70 miles per hour to maintain a safety distance. After obtaining a safety distance between my vehicle and his, I decreased my speed back to 63-65. Then it happened again; tailgating me again. About three minutes later, I was pulled over by pierce county Sheriff. At first I thought I was getting a violation for speeding, but I was wrong. Instead, the officer stated I was preventing traffic from flowing, but there was no traffic. After his comment, I replied I was driving the legal limit and even speeding up so he's not so close to my vehicle. He didn't reply and proceeded with giving me a traffic violation ticket.