A method of controlling a battery system in a vehicle during discharging and charging thereof, the battery system comprises a set of battery stacks connected in parallel, each one of the battery stacks having a set of battery cells connected in series, characterized by the method comprising the steps of: - determining a state charge level of each battery cell of the set of battery stacks; - during discharging of the battery system, identifying a battery cell with a lowest state charge level among the battery cells of the set of battery stacks, or during charging of the battery system, identifying a battery cell with a highest state charge level among the battery cells of the set of battery stacks; - temporarily interrupting discharging or charging of the identified battery cell; - continuing discharging, or charging, the remaining battery cells of the set of battery stacks; - among the remaining battery cells of the set of battery stacks, sequentially temporarily interrupting discharging, or charging, a battery cell in each one of the other battery stacks of the set of battery stacks; - controlling duration of the step of sequentially temporarily interrupting discharging or charging a battery cell in each one of the other battery stacks of the set of battery stacks based on a battery system characteristic, wherein the battery pack system characteristic comprises data indicative of the current through each one of the battery stacks of the battery system and the power output of the battery system; - monitoring state charge levels of the battery cells of the set of battery stacks; - comparing the monitored state charge levels of the battery cells of the other battery stacks of set of battery stacks with the state charge level of the identified battery cell of the corresponding battery stack; and - resuming discharging or charging of the identified battery cell when state charge levels of the remaining battery cells of the set of battery cells of the set of battery stacks corresponds to the state charge level of the identified battery cell. - determining a state charge level of each battery cell of the set of battery stacks; - during discharging of the battery system, identifying a battery cell with a lowest state charge level among the battery cells of the set of battery stacks, or during charging of the battery system, identifying a battery cell with a highest state charge level among the battery cells of the set of battery stacks; - temporarily interrupting discharging or charging of the identified battery cell; - continuing discharging, or charging, the remaining battery cells of the set of battery stacks; - among the remaining battery cells of the set of battery stacks, sequentially temporarily interrupting discharging, or charging, a battery cell in each one of the other battery stacks of the set of battery stacks; - controlling duration of the step of sequentially temporarily interrupting discharging or charging a battery cell in each one of the other battery stacks of the set of battery stacks based on a battery system characteristic, wherein the battery pack system characteristic comprises data indicative of the current through each one of the battery stacks of the battery system and the power output of the battery system; - monitoring state charge levels of the battery cells of the set of battery stacks; - comparing the monitored state charge levels of the battery cells of the other battery stacks of set of battery stacks with the state charge level of the identified battery cell of the corresponding battery stack; and - resuming discharging or charging of the identified battery cell when state charge levels of the remaining battery cells of the set of battery cells of the set of battery stacks corresponds to the state charge level of the identified battery cell. <EOS>