Magnetic flux distribution across a high-temperature superconductor strip is measured using magneto-optical imaging at 15 K. Both the current-carrying state and the remanent state after transport current are studied up to the currents 0.97Ic where Ic is the critical current. To avoid overheating of the sample current pulses with duration 50 ms were employed. The results are compared with predictions of the Bean model for the thin strip geometry. In the current-carrying state, reasonable agreement is found. However, there is a systematic deviation -the flux penetration is deeper than theoretically predicted. A much better agreement is achieved by accounting for flux creep as shown by our computer simulations. In the remanent state, the Bean model fails to explain the experimental results. The results for the currents I ≤ 0.7Ic can be understood within the framework of our flux creep simulations. However, after the currents I > 0.7Ic the total flux trapped in a strip is substantially less than predicted by the simulations. Furthermore, it decreases with increasing current. Excessive dissipation of power in the annihilation zone formed in the remanent state is believed to be the source of this unexpected behavior.