We formulate a theory combining the principles of a scalar-tensor gravity and Rastall's proposal of a violation of the usual conservation laws. We obtain a scalar-tensor theory with two parameters $\omega$ and $\lambda$, the latter quantifying the violation of the usual conservation laws. The only exact spherically symmetric solution is that of Robinson-Bertotti besides Schwarzschild solution. A PPN analysis reveals that General Relativity results are reproduced when $\lambda = 0$. The cosmological case displays a possibility of deceleration/acceleration or acceleration/deceleration transitions during the matter dominated phase depending on the values of the free parameters.