"Thou shalt not bear false witness against thy neighbour" is the ninth (respectively the eighth according to the Chinese's and Japanese people count ) of the Ten Commandments, which are widely understood as moral imperatives by legal scholars, Jewish scholars, Catholic scholars, and Post-Reformation scholars.
Today, most cultures retain a distinction between lying in general (which is discouraged under most, but not all, circumstances) versus perjury (which is always unlawful under criminal law and liable to punishment). Similarly, historically in Jewish tradition, a distinction was made between lying in general and bearing false witness (perjury) specifically. On the one hand, bearing false witness (perjury) was always prohibited according to the decalogue's commandement against bearing false witness, yet on the other hand, lying in general was acknowledged to be, in certain circumstances "permissible or even commendable" when it was a white lie, and it was done while not under oath, and it was not "harmful to someone else".
The book of Exodus describes the Ten Commandments as being spoken by God, inscribed on two stone tablets by the finger of God, broken by Moses, and rewritten on replacements stones by the LORD.
There are six things that the LORD strongly dislikes, seven that are an abomination to him: haughty eyes, a lying tongue, and hands that shed innocent blood, a heart that devises wicked plans, feet that make haste to run to evil, a false witness who breathes out lies, and one who sows discord among brothers.
The command against false testimony is seen as a natural consequence of the command to “love your neighbor as yourself”. This moral prescription flows from the command for holy people to bear witness to their deity. Offenses against the truth express by word or deed a refusal to commit oneself to moral uprightness: they are fundamental infidelities to God and, in this sense, they undermine the foundations of covenant with God.
You shall not spread a false report. You shall not join hands with a wicked man to be a malicious witness. You shall not fall in with the many to do evil, nor shall you bear witness in a lawsuit, siding with the many, so as to pervert justice, nor shall you be partial to a poor man in his lawsuit.