  We study the motion of a one-dimensional run-and-tumble particle with three
discrete internal states in the presence of a harmonic trap of stiffness $\mu.$
The three internal states, corresponding to positive, negative and zero
velocities respectively, evolve following a jump process with rate $\gamma$. We
compute the stationary position distribution exactly for arbitrary values of
$\mu$ and $\gamma$ which turns out to have a finite support on the real line.
We show that the distribution undergoes a shape-transition as
$\beta=\gamma/\mu$ is changed. For $\beta<1,$ the distribution has a
double-concave shape and shows algebraic divergences with an exponent
$(\beta-1)$ both at the origin and at the boundaries. For $\beta>1,$ the
position distribution becomes convex, vanishing at the boundaries and with a
single, finite, peak at the origin. We also show that for the special case
$\beta=1,$ the distribution shows a logarithmic divergence near the origin
while saturating to a constant value at the boundaries.
