Strange behaviour of rotating game object

In my android game I have a sphere which you can turn around (360 degrees) with your finger (up and down around the x-axis).
At the front of the sphere there is a button. When you hit the button, the sphere will rotate to a fixed angle, for example 60 degrees up. Thats working fine.
The code for this:

transform.rotation.x = Mathf.Lerp(transform.rotation.x, 0.5, rotateSpeed);

But when I first turn the sphere around for 360 degrees and then push the button, the sphere will rotate 60 degrees down instead of up.
What I would like to have is that the sphere always will rotate up, no matter if it is first turned around for 360 degrees.

Does anybody know what’s going on here?

I think it has something to do with the following.
When you rotate the sphere upwards, Rotation X goes from 0 degrees to 90 degrees. Then further it goes from 90 degrees to 0 degrees instead of 180 degrees. Then it goes from 0 degrees to 270 degrees and then back to 0 degrees.

So 0 - 90 - 0 - 270 - 0 instead of 0 - 90 -180 - 270 - 0

I hope you understand what the problem is.
What can I do about it?

rotation is in Quaternions. You want to use eulerAngles.

Thanks!

was the solution.